I would like to know how to remove title links in blocks. Thanks

Comments

pitxels’s picture

I already tried theming the quotes node and the block, but this approach don't cover the nodes displayed in the block.

Any idea?

pitxels’s picture

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

nancydru’s picture

Ahh, the Dark Side, indeed. Without check_plain, you have opened your site up to XSS attacks.

nancydru’s picture

Status: Active » Fixed

Committed to both branches. It is now a block setting.

pitxels’s picture

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

pitxels’s picture

I imagine something like this should be in the code:

'#value' => '<h3>'. check_plain($node->title) .'</h3>',
nancydru’s picture

This will be in the next -dev release. -dev releases roll out at approximately Noon and Midnight GMT.

Yes the code looks like that.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.