WSN Knowledge Base
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 articles 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 {TID} contains displaylinks.tpl>
stuff that should show up when we're looking at a page that uses displaylinks.tpl (the 'show articles in category' template)
</IF>

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

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

{TID}, as you can guess from the examples, contains the name of the body template the page is using.

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

Rate this article:

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: 1381 views. Averaging 1 per day.
In the most recent 30 day period, there've been 6 views.

Previous Article | Next Article


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