Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By ______ on
Hi
How can I customise the output of $links in my nodes (using 4.7 beta 4)? I want to be able to choose which links to display and where.
Searching turned up a lot of advice for 4.6 but here Ber says; "In 4.7/HEAD we return structured data for those links. Its very easy to change this in 4.7."
Can anyone point me towards this easy way? That'd be a great help.
Thanks in advance for you help.
Ed.
Comments
Having same problem
I am also struggling with this. Seperating the links seems to be the challenge.
Theme?
Do you want to do this in the theme for node links?
The links from $links are also available in the array $node->links
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
Thanks Heine
I guess that is what I want to do - or would achieve the same result. But where can I find this array $node->links?
I am not a strong php guru but have a rough idea of what to do one the array is separated. What file contains the info I need? Or am I way off base?
I have used a hack to run the array in the page but how can I pick which link I want to copy/move elsewhere.
I just want to have the second link at duplicated at the top of the page. That is the email this page link. It seems harder than I thought or I am complicating it...
Where is this array located?
I'm using php template engine and Kubrick. (I need to remove some of the stuff included by default in the links.)
This obviously isn't locate in the theme page or node templates...but I don't know where to look for the array.
Thanks for any suggestions.
(whoops! just noticed I duplicated the query above)
(oh crap...also noticed this is a 4.7 thread...I'm using 4.6)
Repeated question
No trouble repeating the question; I hadn't even seen the first request...
$node->links is accessible in node.tpl.php (see also http://drupal.org/node/43888#comment-81687)
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
Thanks!
Sorry for being so redundant and repetitive ;-)