Template naming suggestion

NikLP - August 7, 2008 - 08:19
Project:Custom Page
Version:6.x-1.0
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:febbraro
Status:closed
Description

Might it be better to use a naming convention something like custom-.tpl.php instead of just .tpl.php? If you were to use more than a couple of these, looking at a theme directory would be slightly confusing. Furthermore, naming the files like this makes it easy to recognise that they belong to this module, and groups the files together in a typical, alphanumerically sorted directory listing.

#1

NikLP - August 7, 2008 - 08:21

Grr filtered... the first sentence should have read:

Might it be better to use a naming convention something like custom-<name>.tpl.php instead of just <name>.tpl.php?

#2

Setzler - August 11, 2008 - 19:00

I concur.

#3

irakli - August 13, 2008 - 05:11

I think this is a great idea. Furthermore, I think the solution should be even more flexible, where users can define the "prefix" for the template.

Some may like it to be custom-, some may like it to be blank, and some might like it to be the name of their girlfriend or a boyfriend :)

Thanks, I will try to implement this soon.

#4

irakli - August 13, 2008 - 05:12
Assigned to:Anonymous» irakli

#5

NikLP - August 13, 2008 - 08:45

Hm, not sure about the custom naming thing... it would make it more difficult for people examining the theme "from fresh" (ie, sigh unseen) to determine that custom page module was the cause of the "weird" filenames.

I really think it ought to be standardised. If there is room for debate on what that should be, let's open the floor up for discussion.

#6

irakli - August 13, 2008 - 14:54

NikLP,

the default can be standardized. That should be good enough.

#7

febbraro - October 20, 2008 - 20:46
Assigned to:irakli» febbraro
Status:active» fixed

This is in CVS waiting for a release.

I have allowed it to be customized, but it actually defaults to blank as to not break existing installations that already have custompage implementations using no prefix.

As a standard naming convention I would suggest always using 'custompage'

#8

Anonymous (not verified) - November 3, 2008 - 20:51
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.