Call Section Name
Permalink
This is from the page "Useful Functions within Views and Controllers":
Checks a given URL to see if you're in that url's section? (e.g. if you're on page "/about/my/company," passing $this->section('/about'); will return true.
My question: is there a way to call the name of the page's section and assign it to a variable?
Cheers
Darrell
@bool $this->section($url)
Checks a given URL to see if you're in that url's section? (e.g. if you're on page "/about/my/company," passing $this->section('/about'); will return true.
My question: is there a way to call the name of the page's section and assign it to a variable?
Cheers
Darrell
Thanks, Scott. I'm going to look into that, just for educational purposes! But in the mean time I found this on snippler.com:
It was added by c5.org member c5mix.
D
<?php $page = Page::getByID($c->getCollectionParentID()); print $page->getCollectionName(); ?>
It was added by c5.org member c5mix.
D
I know you have purchased the block, check out the models/blog.php i believe there is a determineParentBlogPage which does exactly this that i wrote.
-Scott