SimplePortal

Customization => Custom Coding => Topic started by: AngelinaBelle on March 01, 2010, 03:04:14 PM

Title: Limit Article Block to (select several) Categories?
Post by: AngelinaBelle on March 01, 2010, 03:04:14 PM
[SiNaN] -- I'm pretty happy with the "pick a single category" solution you posted in http://simpleportal.net/index.php?topic=4219.0 (http://simpleportal.net/index.php?topic=4219.0)
Is there any way to make it possible to choose several from the list of article categories?
 
Thanks!
 
Title: Re: Limit Article Block to (select several) Categories?
Post by: AngelinaBelle on March 03, 2010, 08:22:38 PM
I tried all kinds of ridiculous things, following various examples I saw in PortalBlocks, but I just could not figure this one out.
If I do
Code: [Select]
$category_list = getCategoryInfo();
$block_parameters['categories'] = array();
foreach ($category_list as $cat)
$block_parameters['categories'][(string)$cat['id']] = $cat['name'];
I still do not get the "multi-select" behavior I want when I create an sp_articles block.
 
Am I missing something obvious?
 
 
SimplePortal 2.3.8 © 2008-2024, SimplePortal