Hello,

When creating a block out of an advanced poll, how is one supposed to remove the title? It seems $content is just a string containing the full html, not an array as it usually is.

The only way I found to remove the title is to replace "print $content" by

echo str_replace("<h2 ","<h2 style='display:none;' ",$content);

in blocks--advpoll.tpl.php. Is there a better way to do this, or is this how it is intended?

CommentFileSizeAuthor
#1 theming_advpoll_block-1705752-1.patch450 bytestripper54

Comments

P3t3r’s picture

Issue summary: View changes

slight html improvement, making question less important

tripper54’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new450 bytes

Hi there,

Try this patch. It passes a render array for the node in question to $block['content'] instead of rendering it to markup.

mikhailkrainiuk’s picture

Assigned: Unassigned » mikhailkrainiuk

mikhailkrainiuk’s picture

Assigned: mikhailkrainiuk » Unassigned
Status: Needs review » Fixed

Ok. I updated the module according to your patch.

Status: Fixed » Closed (fixed)

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