Replies: 2 comments 3 replies
-
I solved that problem using the code below (which writes the include paths to a file). This also does not find includes within includes. I am not very happy with the replacement of "file:" but it seems to work. Suggestions for doing better will be gratefully received.
|
Beta Was this translation helpful? Give feedback.
-
Summary: I cannot use isCached() as smarty is not always invoked. All web pages are generated with smarty. If a static page (or a component) changes the cached HTML needs to be marked Out-of-date |
Beta Was this translation helpful? Give feedback.
-
I want to be able to get a list of all templates {include}d within another, something that I did with Smarty 2 by looking at $template->properties['file_dependency']. This should ideally include all {include} within an {include}.
I want to do this after running $smarty->createTemplate() and generate a dependency file that lists the included files.
I can see some of this in the _templates_c/xxx.php file but need to do it in the script that calls createTemplate().
The reason for this is that I cache the HTML output and have Apache serve it up without involving PHP at all - so spotting that cached HTML is out of date has to be done by running a separate script which looks at the dependency file.
I suspect that this will be something new.
Beta Was this translation helpful? Give feedback.
All reactions