How to get Child page name and Url?

Permalink
I want to create blog list like this:
http://www.sitepoint.com/

In sitepoint On each pagelist item they have the category name clickable (javascript, mobile and so on)

I work on view.php and create custom template for "page list" block.

Site structure for example (the user must to choose category - on each page i have page-list block)
Category 1 page list (breadcrumbs: home --> blog --> category 1 -->post)
Category 2 page list (breadcrumbs: home --> blog --> category 2 -->post)
Category 3 page list  (breadcrumbs: home --> blog --> category 3-->i am a post inside cat3)

This works fine.

Now i want to create the page "see all" page (location: home -->blog).
I added page-list - How to find the child (relative to blog page) of a list item? (i cant use get current or parent page)

child = seo, mobile, javascript

** I dont use the topiclist block (I create the categories with the sitemap)

siton
View Replies: View Best Answer
MrKDilkington replied on at Permalink Best Answer Reply 1 Attachment
MrKDilkington
Hi siton,

- Create a page type to be used for your blog posts, for this example "Post".
- The blog Page List will filter by the "Post" page type, sort by "Most recent first", and location "Beneath this page" and "Include all child pages".
- On each category page, the Page List will filter by the "Post" page type, sort by "Most recent first", and location "Beneath this page".
- Create a custom template for the blog Page List.
- In the custom template, you will be getting and displaying the page list item parent page title and page link.
// - get the parent page ID of the current page list item
// - get the parent page object using the ID
$parentPageObject = Page::getByID($page->getCollectionParentID());
// - using the parent page object, get the collection name (the page title)
$parentPageName = $parentPageObject->getCollectionName();
// get the URL of the parent page using the parent page object
$parentPagelink = URL::to($parentPageObject);

<h3><a href="<?php echo $parentPagelink; ?>"><?php echo $parentPageName; ?></a></h3>

See attached template.
siton replied on at Permalink Reply
siton
Thanks. This code work well.

The problem is i want in the "see all" list - to know the link/subject of each page category (the child) -

More example of this pattern (blog page have a list of "see all")
http://moz.com/blog

Each topic is clickable.

Its better aproach to solve this with topic-tree? ("THE PROBLEM" i dont like the topic tree auto URLs' - i want [home/blog/category/basic-seo] for example)
MrKDilkington replied on at Permalink Reply
MrKDilkington
@siton

I am not sure what you mean by "see all". Can you be more specific, please.