WSN Gallery
Featuresspacer Showcasespacer Reviewsspacer Demosspacer Purchasespacer Manualspacer Support
Showing wrapper content for one area only
Showing wrapper content for one area only
By Paul

Suppose you have some google adsense code which you want to have display in categories, but not on other pages. Yet you want to have this code in your wrapper template, not in the 'show images in category' template. To do this, you can use a template conditional (see the conditionals manual entry if you don't understand what a conditional is), like this:

<IF templates/default/details.tpl contains displaylinks.tpl>
stuff that should show up when we're looking at a page that uses displaylinks.tpl (the 'show images in category' template)
</IF>

Or for another example, to have something show in the wrapper only on the registration page:

<IF templates/default/details.tpl contains register.tpl>
stuff that should show up when we're looking at a page that uses register.tpl (the 'registration' template)
</IF>

templates/default/details.tpl, as you can guess from the examples, contains the name of the body template the page is using.

Rating:


2.8/5 based on 5 votes. The median rating is 3.

Submitted: 07/02/05 (Edited 07/02/05)

Description: How to use a conditional to display certain text in your wrapper only when a particular template (for example, main.tpl) is being shown in the body of the page.

Views: 1415 views. Averaging 1 per day.
In the most recent 30 day period, there've been 3 views.

Previous Article | Next Article

Home    |    Features    |    Showcase    |    Reviews    |    Demos    |    Purchase    |    Manual    |    Support