By fighella on
I've searched High and Low... but basically what I need is either a module, a hack or a workaround for this...
I have user panels for all of my users and I would like to make it so that when a specific node title or link is clicked on... it redirects a user to the author of that nodes users panel and not the node itself...
so basically with specific node types i want them to go to a different path /user/[author-name-raw]
I can't use path auto because it is telling me the path already exists... I dont want to use content templates to create a dodgy hack...
There must be a way? Any ideas?
JD
Comments
Thinking of a work around...
Can anyone see a problem to hacking the node template to make my node titles link to user pages instead of the nodes themselveS?
and making something like:
Any ideas here? Or could anyone help me write the if ?
Im not sure what I need to do...
JD
sounds reasonable
if you are only doing it for one content type, you can create node-image_gallery.tpl.php and modify the code in that template, and all other nodes for other content types will still use default node.tpl.php
then you don't need the if statement.
getting there...
hey this could be a great solution...
can i do multiple templates then?
Im assuming i just copy the node.tpl.php and rename it...
Any documentation on this I should be looking for?
the theme guide explains this
http://drupal.org/theme-guide/6
yes, you make a copy of node.tpl.php, the format is node-my_content_type.tpl.php
Thank You!
Thank You so much, I think this is going to solve all my problems! Amazing!
theming views
one more thing...
do you know if its possible to control the link created from a view field...
so right now the link defaults to the node itself when you click "link to this node" ...
I would love to be able to say " link to the authors page of this node "
not sure
i'm not sure, I think this would again but a template override where you grab the field yourself and create the link. I could not locate a setting inside views to make this happen using the UI.