ViperSrv Posted November 19, 2013 Share Posted November 19, 2013 Hello, how we can use Template Vars in Hooks? For Example: "fields" => array("option1" => array ("FriendlyName" => "test", "Type" => "text", "Size" => "25", "Description" => "test", "Default" => "test", ) How we can call the option1 inside hooks functions? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted November 19, 2013 Share Posted November 19, 2013 Action hooks are meant to let you use only certain variables that are stored in $vars. If you want to use a template var you have to retreive it with a query. Basically a template var comes from php file and in this file there's a query to database. Simply use a query and get the variables you want. 0 Quote Link to comment Share on other sites More sharing options...
SeanP Posted November 19, 2013 Share Posted November 19, 2013 Kian is correct. Each hook has a list of variables that are available to it (in the documentation). If you need any other information, you would need to query the database or use the API to get data. 0 Quote Link to comment Share on other sites More sharing options...
ViperSrv Posted November 19, 2013 Author Share Posted November 19, 2013 it was so easy....Thanks! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.