Forums
This topic is locked
Which pages use which templates?
Posted 10 May 2005 08:12:08
1
has voted
10 May 2005 08:12:08 anura samara posted:
I'm currently trying to improve a site I inherited from elsewhere. It has 650+ pages using 25 templates - it's a real mess too eg. inconsistent use of templates.I think there is a lot of scope for reducing the templates down to 5 or so (eg. using template expressions), but with such a mess I would really like to figure out which pages use which templates. That way, when I delete a template, I'll have a list of which pages are going to be affected and be able to deal with them.
Does anyone know of a way of generating a list of which pages are using which templates?
Thanks,
AS
Replies
Replied 10 May 2005 17:07:09
10 May 2005 17:07:09 Chris Charlton replied:
Not via DW really, if you know <i>Server-Side</i> coding, you can copy those page files into a folder, run a script/page (PHP, ASP, CFML, JSP) that could search the folder, parse all files by doing some RegExp (fancy searching) to tally up what you want it to say. There will be Template name/association code near the top or near the <head> & <body> tags. This is not a small task entirely, and neither is going through 650+ pages.
Ever thought of producing a CMS system for them?
~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>
Ever thought of producing a CMS system for them?
~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>
Replied 11 May 2005 02:13:14
11 May 2005 02:13:14 anura samara replied:
Chris
Thanks for confirming my worst fears! I thought this might be the outcome ...
Yeah, I'll do some server side processing. I have already written some scripts to parse through a directory structure and grab every file. I'll modify it to look for the template name; while I'm at it, I'll also use it to grab the page title too - sort of turn the job into a content audit.
Yep, I'm looking at building a CMS for the site!! Maintaining it is a real nightmare, and the clients are very fussy too. But as with all things in life, the CMS is getting pushed back by all this urgent work. It's nearly there.
Thanks again,
AS
Thanks for confirming my worst fears! I thought this might be the outcome ...
Yeah, I'll do some server side processing. I have already written some scripts to parse through a directory structure and grab every file. I'll modify it to look for the template name; while I'm at it, I'll also use it to grab the page title too - sort of turn the job into a content audit.
Yep, I'm looking at building a CMS for the site!! Maintaining it is a real nightmare, and the clients are very fussy too. But as with all things in life, the CMS is getting pushed back by all this urgent work. It's nearly there.
Thanks again,
AS
Replied 11 May 2005 05:41:56
11 May 2005 05:41:56 Chris Charlton replied:
Let us know how it goes. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> Good luck!