EE Insider Tips
Sponsored by Mijingo's EE 2 Screencasts
ExpressionEngine mini-howtos created by the EE Insider community.
Change your hidden template indicator
I like to use hidden template indicator to hide templates - the default is to add a period before the template name, so for example if I have a template for my header, I would call it .header so it cannot be accessed directly.
However, the period before a filename also means a hidden file as far as OSX is concerned, so I change from period to underscore to get around the problem.
To achieve this, just open up your system/config.php file and add the following code:
$conf['hidden_template_indicator'] = "_";
Easy!
Email
Print
Post to Twitter
Post to Delicious
Emily H — 12:57 on 03.10.2011
Hi Andy,
I’ve done this and the template doesn’t show up now, but it does redirect to another page instead of giving the 404. I have “Enable Strict URLs” set to yes, so I thought this would stop that happening. At the moment it is showing a page on mysite.org/global/_head URL. Do I need to make the ‘global’ folder name (which holds only embeds and the homepage) start with an underscore too? Can I even do that in EE2 (name a template group with an underscore)?
Cheers
Add Your Comment?
You must have an EE Insider account to post comments on Insider Tips. It's fast, easy and hassle-free.
Sign up now (or login).