Forum

Thread tagged as: Question

Content Templates - Location(s)

I've read about content templates but am not sure of how they work in terms of the CMS.

Can there be more than one .html template with the same name but in a sub folder under /perch/templates/content/ ?

Thanks again

Garth Holmes

Garth Holmes 1 points

  • 6 years ago

Yes. You can have 2 templates named the same, but you'd need to put them in a different subfolder.

For example:

/perch/templates/content/contact_page/template.html

/perch/templates/content/homepage/template.html

Thank you for the reply.

I did this but for some reason or other, it has capitalized the URI

Templates don't dictate the URL of the page. I would check your Page Options to see if something has changed there to affect the URL.

Philip Gwynne said:

Templates don't dictate the URL of the page. I would check your Page Options to see if something has changed there to affect the URL.

No it doesn't but why can't I "dictate" the URL format, e.g. if there are underscores they should be retained and not the first letter of every word should not be capitalized.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Where are you seeing this?

On each page where the Regions are.

There is also a * shown for some of the templates used.

The star shows hidden templates. Hidden templates are templates whose names start with an_. If you have_'s in template names they will be replaced with blank spaces causing first letter in each word to be uppercase. This should not affect any HTML output. Perch merely changes this to make it more human readable in the admin panel.

In cases like this it's best if you can post your template and the code on your page that calls these templates. This will help tremendously and troubleshooting your problem.

Robert Ketter