How to remove title links in blocks
jusspitti - March 13, 2009 - 01:17
| Project: | Quotes |
| Version: | 5.x-1.90 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I would like to know how to remove title links in blocks. Thanks

#1
I already tried theming the quotes node and the block, but this approach don't cover the nodes displayed in the block.
Any idea?
#2
I found the quick solution in the dark side of the force:
in quotes.module find:
if ($block['show_titles']) {$quote->content['title'] = array(
'#value' => '<h3>'. drupal_get_path_alias(l($node->title, 'node/'. $nid)) .'</h3>',
'#weight' => -100,
);
}
and replace it with:
if ($block['show_titles']) {$quote->content['title'] = array(
'#value' => '<h3>'. $node->title .'</h3>',
'#weight' => -100,
);
}
Not elegant but works
#3
Ahh, the Dark Side, indeed. Without check_plain, you have opened your site up to XSS attacks.
#4
Committed to both branches. It is now a block setting.
#5
Thanks this module is great,
I can't find this new option in the quote block, there is a --- Block "View" link text: --- field but entering text or leaving it blank does not make any difference and the titles still have links.
Please advice.
Thanks
#6
I imagine something like this should be in the code:
'#value' => '<h3>'. check_plain($node->title) .'</h3>',#7
This will be in the next -dev release. -dev releases roll out at approximately Noon and Midnight GMT.
Yes the code looks like that.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.