Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // My pages: "Beavers" (ID 1) "Cubs" (ID 2)
- // cParentID is an array of page ID's that.
- // My multi select has these available: Beavers, Cubs.
- // Passing it an array of values for the multi select works like this.
- // I presume addAttribute('scoutnews_article_sections', 'value') would work for a single select
- foreach($this->post('cParentID') as $cPar) {
- $sections[] = Page::getById($cPar)->getCollectionName();
- }
- $p->addAttribute('scoutnews_article_sections', $sections);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement