Situation:
- Drupal 6 node module defining custom content type
- Necessity to have an automated alias for the content type, e.g.
content_type/[title-raw]
Question: How can I programmatically set the Automated alias setting of the new content type to the above pattern in the hook_install
?
Solution is trivial, automated alias patterns of Drupal are stored in variables:
where
content_type
refers to the machine-readable name of the content type andcontent_type_path
is the desired prefix of the alias of the content type.The solution was fetched from the post at http://drupal.org/node/1246334#comment-5038566