Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Possible to track template usage ?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
gordonisnz
Smarty Regular


Joined: 05 Sep 2009
Posts: 70

PostPosted: Sat Jun 06, 2020 9:34 am    Post subject: Possible to track template usage ? Reply with quote

Hi.

I'm wondering if it can be easy to edit the Smarty source / programme to scan a template file and create a report.

EG:

- if (CERTAIN TEXT) is NOT found in a template - it will add details to a report

- Original path/name of the SOURCE template (not processed)
- the URL that activated / uses that template


Basically I want to upgrade my templates and want to identify when templates are last used. When I do upgrade a template, i'll add the specified text (possibly in a comment) and then eventually delete my old / un-used templates.


As more & more templates have the specified text added, I'll eventually find old/dead templates that im not using.


Maybe this feature can also locate the SOURCE filename of missing templates
as well - into the report?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sat Jun 06, 2020 1:55 pm    Post subject: Reply with quote

Create a plugin(function) that does your reporting, and append its call to all existing templates.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP