No announcement yet.

Creating blocks in the Sidebar

  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] Creating blocks in the Sidebar

    I need to create a sidebar block that won't have a name, and admincp does not allow that. Is there any way to trick it into accepting a nameless block or maybe edit the name from the backend, or some alternative way like use a non-print character, etc? Looking for a creative solution here.

  • #2
    Do you only want one block to not have a name? If it were a php block, you could enter a different template in the "Template to Use" field. If it's not a php block, you could edit block_html but that will change all blocks.

    If it's one of the predefined blocks and you only want to remove the title from one ff them, you could edit the block_html template and enclose the title code with <vb:if condition="blockinfo.title != 'something'>...</vb:if>

    Edit: actually, that's not quite right. If you want to remove the title from any of the predefined blocks, you'd have to edt the template corresponding to that block. The block_html template is only used for the "Custon HTML/PHP" template.

    And one more thing I should mention - because of caching, changes may not show up immediately. One thing to do is to edit the block you're working on and set cache time to 0 while you're working on it, then set it back when you've got it working.
    Last edited by kh99; Fri 24th Aug '12, 6:19am.


    • #3
      I have tried using this in the Title area of the block: <vb:if condition="blockinfo.title != 'Forums'>Forums</vb:if>, and the result is below.

      Click image for larger version

Name:	sc.jpg
Views:	1
Size:	21.8 KB
ID:	3690115


      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.