How can I insert variable parts in a custom block title? I would like the title of a custom block to depend on menu options selected in a left block. How can I do that ? Is it possible to hide the title of a custom block?
This can be done by using only smarty (no hacking): This example shows how to make links of the blocktitle depending on the contents of the <{$block.title}> variable.
<div class="blockTitle">
<{if $block.title =="Recent logs"}>
<a href="<{$xoops_url}>/modules/log/"><{$block.title}>a>
<{elseif $block.title =="Recent posts"}>
<a href="<{$xoops_url}>/modules/newbb/"><{$block.title}>a>
<{elseif $block.title =="Recent comments" && $xoops_isadmin}>
<a href="<{$xoops_url}>/modules/system/admin.php?module=0&status=0&limit=100&fct=comments&selsubmit=Go%21"><{$block.title}>a>
<{else}>
<{$block.title}>
<{/if}>
div>
<div class="blockContent">
<{$block.content}>
div>
<{if $varibalename == "1" && $block.title =="Recent logs"}> put some html here <{else}> <{$block.title}> <{/if}>
$xoopsTpl->assign('varibalename', '1');
This Q&A was found on XOOPS Web Application System : https://xoops.org/modules/smartfaq/faq.php?faqid=523