Mambo is great, but its missing some features. One of which is a true Template Preview with my content. After looking around, I found exactly nothing to allow me to do this.
Unlike most people, I didn’t abandon Mambo after I found out it didn’t have a feature I wanted… I rolled up my sleeves, got some coffee and proceeded to hack away at it. The following will help you to do this as well.
About The Hack
This hack was actually pretty simple. So simple, I’m sure others have figured this out already. Also, this hack will only work for the index page, not the rest of your pages - I didn’t feel like going that far with this.
Directions
Download the following zip file: (again, sorry, I do my main development work on Win2K)
Template_preview.zip
Inside, you will find 2 files…
First, backup
administrator/components/com_templates/admin.templates.html.php
Put “template_test.php” into your main directory.
Put “admin.templates.html.php” into
administrator/components/com_templates directory.
Upload both to your webserver and you’re done - pure and simple…
Customization
If you wish to change the name of the template file, feel free to do so. When you do, copy that name, edit the admin.templates.html.php and update the line that has the link to the preview (or search for template_test.php and replace it). You can also update the preview link if you don’t like that either ;-)
Security
I will ALWAYS talk about security… What I would do is chmod template_test.php to 644 when you’re not using it. You can also rename it (ie: template_test.php-bak, off-template_test.php, etc…)
