Custom attribute that is a select with a list of specific page types?
Permalink
I have created a custom page type and want to add an attribute to select an internal link to another page on the site by use of a select. To reiterate, I have a persons page and I want to add a hyperlink that points to a job page by use of a select box. This allows the editor to select a job for that person. This select box should be pre-populated with a list of all job pages.
Is this possible?
Thanks in advance
Is this possible?
Thanks in advance
For 5.7http://www.concrete5.org/marketplace/addons/page-selector-attribute...
Thanks for your continued support.
It only appears to return the page id in the attribute so I had to do this:
If there is a better way, please let me know :)
It only appears to return the page id in the attribute so I had to do this:
$careers_page = Page::getByID($c->getCollectionAttributeValue('careers_selector')); $careers_url = $careers_page->cPath;
If there is a better way, please let me know :)
here's a snippet:
public function getPageName($pageID) { $ret = ""; $page = Page::getByID($pageID); if (is_object($page) && !$page->isError()) { $ret = $page->getCollectionName(); } return $ret; }