hi,
i have a test site at http://www.insight-design-group.com/imc ... x.php?Poll - each parent menu item has a unique banner image which is done using the newsbox technique youll find here http://www.cmsimplewiki.com/doku.php/ti ... ific_pages
so far so good, the problem is that when i click on any sub-menu item the banner changes to the generic banner - this was fine at first but what i would like to happen is for the unique image banner to remain throughout the sub-menu and sub-sub-menu items.
currently i can only achieve this by manually going into each sub-page and adding the cmsimple newsbox script - you can imagine the mess if i tried to get a client or novice to login and manage their content like that!
is there someone clever enough out there to know how to automatically get the unique banner images to remain constant for each menu item?
if you look at the 'services' menu item - http://www.insight-design-group.com/imc ... p?Services - you'll notice the first two sub-pages retain the unique banner image ( this is using #CMSimple $news = 'alt2';# in the content area , whereas....
the sub-pages for this parent item only show the generic image - http://www.insight-design-group.com/imc ... x.php?Poll - check the sub-pages
my template uses something similar to this <?php if ($news==""){echo newsbox("mainImage");} else {echo newsbox($news);} ?> - like the wiki example.
look forward to your replies...
advanced Newsbox function
Moderator: Tata
Re: advanced Newsbox function
In the moment, that's not so easy. There may be a plugin soon which could help. However, just right now there is a manual way to solve this issue.
So, you could add to your template at that position where you want to change the Newsbox:
This should do the job. However, you cannot change headings anymore.
Or you generate an external php file and include it here.
Till
So, you could add to your template at that position where you want to change the Newsbox:
Code: Select all
if (strtok($su,':') == "Services") {echo newsbox("NBox1");}
elseif (strtok($su,':') == "Poll") {echo newsbox("NBox2");}
else {echo newsbox("NBox3");}
Or you generate an external php file and include it here.
Code: Select all
<?php
switch(strtok($su,':'))
{
case "Services": echo newsbox("NBox1"); break;
case "Poll": echo newsbox("NBox2"); break;
case "Faqs": echo newsbox("NBox3"); break;
case "Media": echo newsbox("NBox4"); break;
.
.
.
default: echo newsbox("defaultbox"); break;
}
?>
Re: advanced Newsbox function
thanks a lot Till,
i will give this a try
i will give this a try
Re: advanced Newsbox function
Till,
you are the man!
works perfectly - i love cmsimple
you are the man!
works perfectly - i love cmsimple