Is there a full list of the variables anywhere?
I'm trying to use if / else statements to display certain content on some pages but not all ie. not on main page, but on categories and other pages
The wiki page hasn't been created![]()
Is there a full list of the variables anywhere?
I'm trying to use if / else statements to display certain content on some pages but not all ie. not on main page, but on categories and other pages
The wiki page hasn't been created![]()
I dont understand.
You can use
you would put that code into detail_link.html, if you didnt want it displayed on another page you wouldnt add the code.Code:<% if $something!='' %> this is <%$something%> <%else%> somethign didnt exist, so i will do nothing <%/if%>
Im assuming your doing it with blocks - tell us what your trying to achieve.
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
I'm trying to change part of the header depending on what type of page the person is on.
If you go to http://www.armchair.ie you will see that there are no google ads on the main page, however there are ads on the category pages.
What I can't work out is which variables to use for the other non-category pages, excluding the main page.
Do you get me?
This question has been beat to death already for months. The answer that you will get is to look at the incomplete documentation site at http://www.indexuguide.com . I know as I have been looking for this list myself.Originally Posted by blacknight
The best answer that I have self tough myself is to look into the templates directory and take your best guess at what each one you find does. Each template variable starts with a <% and ends iwth %> . You can also include files and php using <%include_php file ="filename.php"%> or <%include file ="filename.ext"%> where ".ext" stands for the extention like .html or .txt . There are also some simple script tests you can do using "if" statements etc.
Last edited by GremlinGod; 08-12-2006 at 12:52 PM.
its smarty... all the variables are the same as on the smarty website, except the are using the <% %> instead of the standard ones that use {}
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
A URL would be helpful. :-) Thank youOriginally Posted by inspireme
heres the documentation for smarty :
http://smarty.php.net/manual/en/
the chapters 7 and 8 are the most relevant
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
Okay, you can detect the category page by identifiying the value of these variables: <%$cat%> or <%$category_path_search_opt%>. But i suggest the latest one. Here is a sample code for your headerIf you go to http://www.armchair.ie you will see that there are no google ads on the main page, however there are ads on the category pages.
What I can't work out is which variables to use for the other non-category pages, excluding the main page.
Code:<%if $category_path_search_opt%> ................ google code here ................ <%else%> ................ non category page code here ................ <%/if%>
Dody - what about the non-category pages? Do they have a specific variable each?
I'm trying to place specific content on certain pages - not just ads, so knowing which variable to use is important.
For example, I've moved the "subscribe to category" into the header, but I've got it to only display on category pages, as it would be pointless displaying it on other pages
i did that, put htis in your header :Originally Posted by blacknight
as i remember i got a bit confused when i did that, but the above seems to be workign great on my site, and i cant remember what the problem wasCode:<%if $category_path_with_link !=''%> <%$category_path_with_link%> <%else%> <%$category_path%> <%/if%>![]()
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
Currently there's no identified regarding which page is being processed.Dody - what about the non-category pages? Do they have a specific variable each?
I'm trying to place specific content on certain pages - not just ads, so knowing which variable to use is important.
although you cant check to see what page you are on, you CAN check to see if a variable exists and deside what to do... eg/ my example above... sure not the prettiest solution but it worked for me.
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )