Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

List all variables available from within template ?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
sarahfoxnz
Smarty Regular


Joined: 11 Apr 2010
Posts: 76

PostPosted: Fri Dec 29, 2017 1:33 am    Post subject: List all variables available from within template ? Reply with quote

Smarty - 2.6.26

I am wondering, from within a smarty template, is there a way to list all the variables that are available

NOT in the PHP script or the config file - just by editing the template.
Back to top
View user's profile Send private message
bsmither
Smarty Elite


Joined: 20 Dec 2011
Posts: 322
Location: West Coast

PostPosted: Fri Dec 29, 2017 7:35 am    Post subject: Reply with quote

I am not sure about 2.6.26, but in Smarty3, you can add
Code:
{debug}
to the end of the template.

This will add HTML (javascript?) popup code to the output. Let your browser show popups.

The popup will list all the variables available to that template, and their values.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP