Unofficial patch: template preview

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Unofficial patch: template preview

Post by tsw »

So you have a live site and you need to develop a new template for it but dont want to copy the content to a new server.

This patch allows you to view the page with different template (not a stylesheet swither only), of course its not perfect, multiple content blocks for example wont work correctly...

adds a new column to template list "view on site" which will show you (and only you) the preview of that template (you can still browse around the site as you want) when you want to return to "live" view just go back to templates page and either select another template to view or select the same template again.

or if you are not afraid of writing something on the url bar you can use

index.php?template_preview=TEMPLATE_ID to start preview

and

index.php?template_preview=off to end previewing.

Hope someone finds this usefull

ps. diff renamed to diff.txt
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Unofficial patch: template preview

Post by Dr.CSS »

Sorry, how does one use this?...
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Unofficial patch: template preview

Post by tsw »

save the diff file, run it in with patch (or change the lines by hand, just remove the ones marked with - and add the ones marked with +)

then you can call index.php with a new parameter template_preview=someid
Post Reply

Return to “Tips and Tricks”