SmartFAQ is developed by The SmartFactory (https://www.smartfactory.ca), a division of InBox Solutions (https://www.inboxsolutions.net)

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.
le="color: #000000"><?php <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 you want the blocktitles to depend on the selected menu option use a smarty variable that only applies to the specific page the user navigated to. Example:
le="color: #000000"><?php <{if $varibalename == "1" && $block.title =="Recent logs"}> put some html here <{else}> <{$block.title}> <{/if}>
If needed, create the variable yourself. This will require some hacking. Example: insert this in index.php of a module where you want to change te blocktitle when te user navigates to this page.
le="color: #000000"><?php $xoopsTpl->assign('varibalename', '1');


The comments are owned by the author. We aren't responsible for their content.


Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!