Auto creation of blank tpl files

Setzler - August 11, 2008 - 18:58
Project:Custom Page
Version:6.x-1.1-beta3
Component:Code
Category:feature request
Priority:normal
Assigned:irakli
Status:closed
Description

Could you make the module automatically create the blank tpl files for a given custom page?

#1

irakli - August 13, 2008 - 05:04

Two reasons why this feature may not be a good idea:

1) In CustomPage pages can be themed with a theming function OR a template. Template files override theming functions. If template files were automatically created, theming function would not get a chance, unless template was deleted. That's somewhat odd workflow.

2) More importantly: tpl.php files for CustomPage are under theme folders. These folders are not necessarily writable from PHP and security-wise, they probably should not be. If the folder is not writable, script can not create a file there.

But, to not disappoint you, I have to tell you that the provided UI module is only one implementation of managing custompages. Custompages itself is an API and any other interface can be attached to it using the hooks provided by the module. So, even though I don't currently think proposed feature is a good enhancement, you can write an extension module that does that or even more.

Please refer to the documentation for more information: http://drupal.org/node/286219

#2

irakli - August 13, 2008 - 05:05
Assigned to:Anonymous» irakli
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.