Support Forums

Looking for list of variables.

This is a discussion on Looking for list of variables. within the Templates, HTML, CSS, and Design Help forums, part of the General category; Is there a list posted anywhere with variables that can be used in templates? Example: Title: {$title} Name: {$name} Address: ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 10-06-2006, 01:16 PM   #1
Customer
 
Join Date: Sep 2006
Location: USA
Posts: 156
Rep Power: 24
BigOrange will become famous soon enough
Default Looking for list of variables.

Is there a list posted anywhere with variables that can be used in templates?

Example:
Title: {$title}
Name: {$name}
Address: {$address}

I know, some of themm are obvious but a list sure would be useful when modifying templates. Right now I'm looking throught the code to find them when I need to reference one of them and it is time consuming.

Thanks!
__________________
v4.1.9 Designer - Default template (modified)

"I have never forgotten anything... if I have I can't remember what it was."
BigOrange is offline   Reply With Quote
Old 10-06-2006, 01:29 PM   #2
The Master
 
Maffo's Avatar
 
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,342
Rep Power: 52
Maffo is just really nice Maffo is just really nice
Default

open layout.tpl and type {debug} with the brackets

Go to any page on your website and a popup will appear with a list of variables
__________________
**Bulk Upload System** has been upgraded. Works on all v4 versions with new functionality. Free upgrade for existing customers.
Maffo is offline   Reply With Quote
Old 10-06-2006, 01:30 PM   #3
Staff
 
Join Date: Mar 2006
Location: New Jersey
Posts: 2,149
Rep Power: 68
John Snyder is a jewel in the rough
Default

The variable change per page so a list would be quite long. The best method you can use would be the debug window.

Just append this to the url: debug=true ie
viewlisting.php?view=1&debug=true

or you can place {debug} within the template and it will initiate the same popup with all the variables and data being passed to that page.
__________________
John
68C Staff

68C Downloads | Report a Bug | Knowledge Base
If you have a current support subscription, you can Submit a Support Ticket
John Snyder is offline   Reply With Quote
Old 10-06-2006, 02:17 PM   #4
Customer
 
Join Date: Sep 2006
Location: USA
Posts: 156
Rep Power: 24
BigOrange will become famous soon enough
Default

{debug} works for showing the variables. I know variables can change. Maybe what I should have said I am looking for is a list of constants. A list of things I can insert into the template files. I'm sure there is a master list somewhere that the developers like you guys refer to:

Title: {$title}
Name: {$name}
Address: {$address}
? website name
? website url
? things like this

Do others not keep a master list of varible names instead of poping up windows all the time? Does that make any more sense?

Thanks for your help.
__________________
v4.1.9 Designer - Default template (modified)

"I have never forgotten anything... if I have I can't remember what it was."
BigOrange is offline   Reply With Quote
Old 10-06-2006, 02:35 PM   #5
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Constants are defined in 2 places, one is the language file and you can see a lits of all the names there. The other is in the database table class_admin for things that are set from within admin such as site title, keywords etc.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 10-06-2006, 02:38 PM   #6
Staff
 
Join Date: Mar 2006
Location: New Jersey
Posts: 2,149
Rep Power: 68
John Snyder is a jewel in the rough
Default

Nope, no list I work off of.

It might be much easier to just state exactly what you are trying to display and those variables can be listed. It will go a long way if you study the variables availible within the template files, ie keywords, description, etc.
__________________
John
68C Staff

68C Downloads | Report a Bug | Knowledge Base
If you have a current support subscription, you can Submit a Support Ticket
John Snyder is offline   Reply With Quote
Old 10-06-2006, 02:50 PM   #7
Customer
 
Join Date: Sep 2006
Location: USA
Posts: 156
Rep Power: 24
BigOrange will become famous soon enough
Default

The last one I was looking for was {$smarty.const.URL}.

I can find them as I need them. I just assumed there was a list. Thanks to everyone for pointing me in the right direction.
__________________
v4.1.9 Designer - Default template (modified)

"I have never forgotten anything... if I have I can't remember what it was."
BigOrange is offline   Reply With Quote
Old 10-06-2006, 02:55 PM   #8
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by BigOrange
The last one I was looking for was {$smarty.const.URL}.
That one is in the database.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 09:15 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0