Forum

Thread tagged as: Question, Problem

Template Fike names

Does it matter whether I use underscores or dashes for my perch template file names?

I've noticed that if I use an undersccore like this:

ht_poem_detail.html

It displays in the Perch Admin as 'Ht Poem Detail.

But if I use dashes like this:

ht-studio-gallery.html

It displays in the Perch Admin as 'Ht - Studio - Gallery'

Is this the only difference or should I stick to only underscores or dashes. I'm so used to using dashes in my filenames now and not underscores but I'm now concerned I need to find out if I should be using underscores.

Also - if I do need to change my file names and replace all dashes with underscores does this mean I'm going to have to redo all the content on my pages - what would be the best way to update all my template file names without interfering with the content already in place using the templates with dashes in the filename?

Evie Milo

Evie Milo 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Dashes or underscores is up to you, and you can mix them.

If you want to change, rename the template and then pick the new template from the region options. (Or safer, copy the template with a new name, update the regions to the new template, then delete the old one.)

Super - glad to know I've not cocked up there - got a little bit of reworking to do as I've got a mix of underscores and dashes and want to clean things up so my labelling is consistent and the admin is easier for client to understand.