Loading...
 
Skip to main content

Features / Usability


Banner related to MenuID

Hi,

I was wondering if there is such a modification currently available...

the logic is simple... the banner would appear in relation to the MenuID...

This can help show banners that are related to the content of the page...

Let me know if there is any other way to do this..

Thanks
hk

I'm not sure I understand why you need the menu ID. However, you can easily create several different banner zones, then have a specific banner zone appear for a specific page.

You'll need something like this:

Copy to clipboard
{if $page eq 'Foo'}{banner zone=Foo} {elseif $page eq 'Bar'}{banner zone=Bar} {/if}


This is exactly the approach I use hereQuestion — the right side ad appears only on specific pages.

HTH,

-RickQuestion


hello Rick,

That is a good idea.. however, if i have in access of 50 pages... each divided in a group of 10...

so basically i will be displaying the same banner on 10 pages, I have created seperate menu for each set of 10 pages..

so in my case, i want to create 5 different banners... while loading the system should check the page and corresponding menu id, based on that it should display the menu..

Alternatively, if i use your method, that will mean that I have to add 50 Checks in the same module to check each page... that will slowdown the system?

plus, in future if i add more pages... i will still have to edit this module..

i hope you get my point...

let me know if there is a trick of doing this...

thanks
hk

> hello Rick,
>
> That is a good idea.. however, if i have in access of 50 pages... each divided in a group of 10...
>
> so basically i will be displaying the same banner on 10 pages, I have created seperate menu for each set of 10 pages..
>

Are you dividing the pages by using a category? If so, then you can simply check for the category and show the banner zone based on the category. And, if you combine the zone name with the category ID, you'll only need to do a single check (if statement).

For example:

Copy to clipboard
{if $page and ($is_categorized eq 'y')] {banner zone=Foo{$id}} {/if}


This will check to see if you're on a wiki page and if the page is categorized. If yes, then it will show banner zone FooXX where XX is the category ID.

So, basically, you'll need to:

  1. Make 10 new categories (and record the ID for each).
  2. Categorize the 50 wiki pages in to each of the 10 categories.
  3. Create 10 different banner zones (Foo1, Foo2, Foo3, etc.) that correspond to the category IDs.


Note: You'll need to check the syntax in my example code... I'm not 100% sure how to combine a smarty variable {$id} within the banner zone plugin. Someone else, maybe.... ?

HTH,

-RickQuestion