Welcome Guest, Not a member yet? Register   Sign In
Global Variables in Templates
#1

[eluser]Lucas3677[/eluser]
I'm trying to implement simple global variables within my view files, so that when someone creates a template they can just type {site_owner} or {admin_email} and have it replaced by the correct value at run-time.

My first instinct tells me that I should create a hook at display_override and just replace the strings there. Is there a better way to do this?
#2

[eluser]gtech[/eluser]
have you looked at the parser class?

[url="http://ellislab.com/codeigniter/user-guide/libraries/parser.html"]http://ellislab.com/codeigniter/user-guide/libraries/parser.html[/url]




Theme © iAndrew 2016 - Forum software by © MyBB