Download & Extend

Evaluate suggested node-X.tpl possibilites using $_REQUEST['q']

Project:PHPTemplate
Version:master
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Because drupal rewrite $_GET with any resolved alias target, the logical alias hierarchy of a Drupal site is discarded when evaluating that or when using arg() to retrieve the arguments. For example, if we setup a series of aliases as such:

/press -> taxonomy/term/1
/press/article_one -> node/12
/press/resources -> views/1

If we had one layout for /press content, we would be forced to setup three tpl files to accomplish this: page-taxonomy-term-1.tpl.php, page-node-12.tpl.php, and page-press.tpl.php respectively. Adding this patch retains the current behavior, but adds suggestions for template files based on $_REQUEST['q'], which drupal does not alter.

AttachmentSize
phptemplate.engine_21.patch590 bytes