Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smarty - Setting Cache or Compile ID #33

Closed
TreeNode opened this issue Oct 10, 2011 · 2 comments
Closed

Smarty - Setting Cache or Compile ID #33

TreeNode opened this issue Oct 10, 2011 · 2 comments

Comments

@TreeNode
Copy link

Unable to set a cache_id or compile_id in a fetch call.

For more info:
http://www.smarty.net/docsv2/en/caching.multiple.caches.tpl
http://www.fuelphp.com/forums/topics/view/5195#5263

@WanWizard
Copy link
Member

There's more wrong here.

The Smarty view class uses fetch() to fetch the smarty template, passing the template data as the second parameter. That doesn't work in Smarty, you have to call assign() on the Smarty object to assign variables to the template, then call fetch().

@WanWizard
Copy link
Member

Implementing extra fetch parameters is not that easy, as it would interfere with the way the View class is working.

For custom solutions, like passing the cache_id, either do it like you do now, or extend the View class and overload the process_file method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants