By luyendao on
At the bottom of every blog node, there's a link for "author's blog" | "comments" -
It seems that drupal just prints "links" but there's no way to say, only output this link, and not this one...how do i customize this? I only want "add comment" to be there. Do i have to hack the link module?
I'm hoping someone can point me to links, i'm sure people have faced this before.
Thanks,
Comments
Hacking neccessary. No 'clean' solution AFAIK.
Possible options at your disposal:
I faced a similar problem sometime back and my limited research showed that there was no clean way to control the contents of $links.
Hope this helps. Do let us know what you finally did.
...
Hi Varun,
Thanks for your exhaustive post, i appreciate your time and effort. IThe first and third option sound like the easiest to implement.
As much as I like Drupal, i wish more of these fine-grain rendering things were not at the code level, but at a .properties or xml layer, where they're more easily editable!
Lu
A partial solution
Hey all!
With regards to these links, I also had this problem, and came up with the following work-around. In my case, I simply did not want "blog_links" to display. The same tactic can be used to add other links as desired.
tarek : )
Thanks, this got me thinking in the right direction
Tarek's solution almost worked for me, but then I realized that I would lose the links generated by the print and forward modules. While poking through the blog.module code, it occurred to me that all I had to do was override theme_links in my theme's template.php file. For instance, if my theme's name was 'foo', I could do like so:
function foo_links($links, $attributes = array('class' => 'links')) {
/* Get rid of the "so-and-so's blog" links */
unset($links['blog_usernames_blog']);
return theme_links($links, $attributes);
}
Gotta love it when a fellow
Gotta love it when a fellow Frank Lloyd Wright fan mentions one of my modules on my birthday. ;-)
I'm actually having problems getting comment_link to output anything at all and it's driving me nuts. Trying to use it in a views theme (views-list-exchange_promoted.tpl.php):
Just outputs:
Sean Robertson
webolutionary@webolutionary.com
Sean Robertson | @seanr1978 on twitter
seanr@webolutionary.com