Published by Mijingo

tips icon image

EE Insider Tips
Sponsored by Mijingo's EE 2 Screencasts

ExpressionEngine mini-howtos created by the EE Insider community.

Hidden Templates

User's avatar
  • Posted by Erik Reagan
  • June 07, 2009
  • 3 people have found this tip helpful.

You can easily make a template “hidden” by adding a period before the name. This comes in handy if you use embeds that you don’t want accessed via the standard template group/template route. For example by default you can access the following file:

http://domainname.com/index.php/embeds/masthead 

If you don’t want this to be accessible via the browser URI you can rename “masthead” to “.masthead” then when this URL is accessed:

http://domainname.com/index.php/embeds/.masthead 

The site 404 template (established under Templates > Template Preferences) will be displayed.

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).

Search EE Insider Tips
Sponsored By