[DUG-TO] Custom node/add and node/edit page titles
Khalid Baheyeldin
kb at 2bits.com
Thu Dec 4 13:37:51 EST 2008
The following code should do what you intend.
But, I am not sure if it will override the original path's title.
If not, then perhaps add it to a hook_exit() so it is the last thing that
happens.
<?php
if ($_GET['q'] == 'node/add/tomato') {
drupal_set_title(t('Throw a tomato at us ...'));
}
?>
On Thu, Dec 4, 2008 at 1:31 PM, Design Guru <subscriptions at designguru.org>wrote:
> *Also just posted at http://drupal.org/node/342750
>
> Hey all,
>
> I've been searching for days for an approach that actually works - its a
> shame that this isn't a simple option when editing each node type from
> the regular drupal admin side but...
>
> ...I'm looking for a snippet to throw into my template.php which will
> let me specify a custom title atop a node submission/editing page per
> content type; so instead of 'Create Tomato' I could specify say 'Throw a
> tomato at us' when a user is looking @ the node/add/tomato page.
>
> I'd love to know if there's an approach to use for both drupal 5 and 6 -
> if they aren't the same then I would super appreciate snippets for
> both... I'm surprised to not have found this info anywhere in the
> handbook...
>
> Thanks,
>
> q./
>
> --
> tel: 1.416.642-5469
> fax: 1.647.439-0891
> -
> Design Guru - http://www.designguru.org
> Using Open Source Software to foster community online.
>
> _______________________________________________
> DUG-TO mailing list
> DUG-TO at lists.openject.com
> http://lists.openject.com/listinfo/dug-to
>
--
Khalid M. Baheyeldin
2bits.com, Inc.
http://2bits.com
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra
Simplicity is the ultimate sophistication. -- Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openject.com/pipermail/dug-to/attachments/20081204/a7d72ff1/attachment.htm
More information about the DUG-TO
mailing list