url alias and different theming
Hi all,
I have an admin section in my website where all the pages have a path of /settings e.g. /settings/node/add (I expose various bits of core code without giving normal users access to the drupal /admin section). All pages under the /settings section use a different page tpl (page-settings.tpl.php).
I have just created a content type (content_help), which will only ever be used in the settings section to help users. So I would want this to work with a path of settings/help/title-of-help-node.
If you set up an alias for this using pathauto, rather than using the settings version of the tpl, it uses the normal one (page.tpl.php). Can anyone help me to understand what I am doing wrong, either on the tpl side or on the aliasing side.

On the alias side, you should
On the alias side, you should now have an option under URL Aliases » Automated alias settings » Node Path settings for each content type, as well as a Default path pattern option. So simply put settings/help/[title-raw] for the settings for the Help content type.
As far as I remember, for the subpage to pick up the page.tpl.php of the parent, you might need a slighlty different snippet of PHP in your template.php file.
"Set a man a flame, keep him warm for a day. Set a man aflame, keep him warm for the rest of his life."
Are the settings pages using
Are the settings pages using page-settings.tpl.php because the Content Type is "settings"? Or have you used something to be able to base template files on the URL alias? Like this - http://drupal.org/node/139766 - has been awhile since I've looked at this!
Dave
"Set a man a flame, keep him warm for a day. Set a man aflame, keep him warm for the rest of his life."
Thanks
Hi Dave,
I have got my auto aliasing for the content_help set up exactly as you described.
I think that link you provided is exactly what I'm looking for. I don't have a content type of settings, just a bunch of functions inside a custom module that output a variety of pages to various paths beginning with /settings. I'll have a play around with that and see how I go, thanks very much.
MySweetShadow - Heavy Metal Blog, Drupal & SEO
FiveRDesign - Drupal Development & Custom Modules
No worries at all. I think if
No worries at all.
I think if you do add the code on that page to your template.php file, it should allow templates build on the alias. If it doesn't find one for page-settings-help.tpl.php, it should look upward for page-settings.tpl.php
Worth a look anyway!
All the best
Dave
"Set a man a flame, keep him warm for a day. Set a man aflame, keep him warm for the rest of his life."