How to display the URL and name of the parent page in a layout file? #845
-
Hello, How to display the URL and name of the parent page on the normal page. I'm not a developer, but I'm trying to modify the theme myself to do what I want. I am using "$this->yellow->page->getParent()", but it cannot be displayed correctly, and an error has occurred. Prompt Object of class YellowPage could not be converted to string. How can I use getParent(), or other methods to display the URL and name of the parent page? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hi, just a push (not an answer, unfortunately since I am looking for exactly the same thing! |
Beta Was this translation helpful? Give feedback.
-
I don't understand exactly what you want to do. Can one of you explain this in more detail? The breadcrumb extension is not a solution? (https://github.com/annaesvensson/yellow-breadcrumb) |
Beta Was this translation helpful? Give feedback.
-
As you wrote
|
Beta Was this translation helpful? Give feedback.
As you wrote
$this->yellow->page->getParent()
gives access to the parent page. Here's an example: