Hi!
I would like to know how can the banner image be changed depending on the chosen category.
Thanks in advance
Offline
I invite you to read
Offline
Hello!
Thanks, ddtddt. But I have not found out the way to associate a Category (not theme) to an specific banner.
I have installed "Add index" plugin, just to have an index.php file for each category, but I don't know if modifying it can be useful. Any idea would be appreciated.
(It is the same question shown in this topic : http://forum.phpwebgallery.net/viewtopic.php?id=1345)
Last edited by manute (2008-10-30 10:23:05)
Offline
Install and active LocalFiles Editor
In 5th tab (personal plugin), insert:
add_event_handler('loc_end_section_init', 'personal_banner_changer');
function personal_banner_changer()
{
global $conf, $page;
if (!isset($page['category']['id'])) return;
switch ($page['category']['id'])
{
case 8:
$conf['page_banner'] = 'banner for category 8';
break;
case 12:
$conf['page_banner'] = 'banner for category 12';
break;
case 24:
$conf['page_banner'] = 'banner for category 24';
break;
}
}
You have to change category number in bold...
Last edited by P@t (2008-10-30 11:03:53)
Offline
Thank you very much, P@t! It works as I wanted!!
Offline