By Cayhn on
Okey so this is what I want to do. I want to add an extra link for a node to see its full content. All done and the link is where it supposed to be and such.
But I use pathauto and clean urls which means that the nodes link will be username/nodetitle. How do I make a link that works? right now the working link would say username/a-node-title
But when I add my link the path will be username/a+node+title
How do I make the + into -?
The simple line of code I use:
echo l(t('Read full content'),''.$owner->name.'/'.$node->title, NULL, NULL, NULL, NULL, TRUE);
Comments
If I'm understanding
If I'm understanding correctly your node title consists of spaces.
If you go to admin/settings/pathauto -> General Settings -> Seperator do you see a + sign there? If so try changing that to a -!
Not sure if it'll solve your prob, am pretty new to Drupal.
Cheers
________________
Live fast die young
path auto only creates aliases for url....
try this
print l(t('Read full content') , 'node/'. $node->nid ,NULL, NULL, NULL, NULL, TRUE);as path auto only create aliases of urls it doesnt change urls
so you can access your nodes as 'http://www,yoursite.com/node/$nid'
thanks
Thanks alot! That worked
Thanks alot! That worked just fine!
And thanks Bartezz for the suggestions, it could probably have worked but since I dont want to change the separator from - to + I couldnt do it. According to Drupal + instead of - could mess up the site :)