Skip to content

How to display the URL and name of the parent page in a layout file? #845

Discussion options

You must be logged in to vote

As you wrote $this->yellow->page->getParent() gives access to the parent page. Here's an example:

<?php $page = $this->yellow->page->getParent() ?>
<?php if ($page): ?>
<a href="<?php echo $page->getLocation(true) ?>"><?php echo $page->getHtml("titleNavigation") ?></a>
<?php endif ?>

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@schulle4u
Comment options

@JetGum
Comment options

Comment options

You must be logged in to vote
2 replies
@JetGum
Comment options

@PetersOtto
Comment options

Comment options

You must be logged in to vote
1 reply
@JetGum
Comment options

Answer selected by loveeric
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants