Advertisement
Guest User

Untitled

a guest
Jul 19th, 2012
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. <?php
  2. // My pages: "Beavers" (ID 1) "Cubs" (ID 2)
  3. // cParentID is an array of page ID's that.
  4. // My multi select has these available: Beavers, Cubs.
  5. // Passing it an array of values for the multi select works like this.
  6. // I presume addAttribute('scoutnews_article_sections', 'value') would work for a single select
  7. foreach($this->post('cParentID') as $cPar) {
  8. $sections[] = Page::getById($cPar)->getCollectionName();
  9. }
  10.  
  11. $p->addAttribute('scoutnews_article_sections', $sections);
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement