Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By cyberia on
Hi-
I'm perfectly newby in Drupal . I want to set a specific template to specific url (Not specific node type).
For example for: domain.com/test/tt
I read somewhere I should make something like "page-test-tt.tpl.php" or "page--test--tt.tpl.php" (in drupal 7) but it does not help. I use autopath module and Drupal 7.
Comments
Internal system URLs
If you are using Pathauto or another module that aliases the URL shown to users your page--test--tt.tpl.php should be changed to use the internal system URL. ie. page--content--tt.tpl.php. You may also have to use theme_hook_suggestions in your template.php.
See: http://drupal.org/node/1035656#comment-3996684 for an example.
having same issue on custom page creation
i want to link tpl.php with domain/Hotel-Octave-Accommodation so could you tell me what should be the tpl file name, i saved as page--Hotel-Octave-Accommodation.tpl.php in the folder theme/theme name/page--Hotel-Octave-Accommodation.tpl.php but its not working. (Drupal 7.x)
You should be using internal
You should be using internal path to make template suggestions unless you force it in template.php.
The easiest way (for me at least) to get the internal path is
What's new and changing in PHP 8