Welcome Guest, Not a member yet? Register   Sign In
Redirect directly to view files
#1

[eluser]Unknown[/eluser]
We have integrated smarty in codeigniter.We have some footer links which are static tpl files.Is there any way to directly redierct to the html files without creating controllers?
is there any rewriting rule?
#2

[eluser]slowgary[/eluser]
If they're footer links, I assume they're part of another page. If this is the case, you wouldn't want to redirect to them... You could open and read the file and just echo it's contents.
#3

[eluser]Unknown[/eluser]
Actually each footer link has it's own different tpl file so on click of each link it should display individual tpl files of that link.Even some files contains dynamic content and reading and displaying content is bad practice when there are more than 20 files.So is there any way to display tpl files without using controller or any rewriting rule which will load automatically template file if just name of file is passed without extension(.tpl).
#4

[eluser]TheFuzzy0ne[/eluser]
It's possible. Just create a PHP file at the same level as the index.php can perhaps call it "static.php", and that file can invoke Smarty and output the requested page.




Theme © iAndrew 2016 - Forum software by © MyBB