Get Page Title (not covered in cheat sheet)
I am trying to make a statement to adapt my theme outside of autonav.
I need to say basically:
IF page level = below 1 THEN print parent title
ELSE print page title
However I cant work out how to say the print page title bit as the copy from the Cheat sheet deonst work in this context and I am not that shot at PHP.
So far I have the below - what should go where the XXX is. Any help greatly appreciated.
You assign the variable root to the current page with $root=Page::getCurrentPage(); Root now holds the page object, which you get information about the page from, so making a call to get the name of root calls the current name.
Just wondering how would I go about making what is currently a static link, a link to the parent page? Clearly out of my depth but once thats done itll all be a nice submenu.