Hi,
I am developing a icms site for my school, and I am using the brighthost theme from Mr.Theme, MultiMenu and pico. The brighthost puts 5 buttons across the top of the page and I want to link these to 5 MultiMenu blocks 01 to 05, one block for each button. The thing is I want all the blocks to be in the same position on the topleft and I want to hide or show them depending on which brighthost button is pressed. This is going a step further from just hiding or showing a title, I am interested in the whole block. I have written a basic php function called function.show_hide_block.php which I put into the smarty/plugins folder. This file contains the function below:-
function smarty_function_show_hide_blocks () {
if (is_array($xoops_lblocks)) {
foreach $xoops_lblocks as $block {
if ($block.title !== 'Elementary') {
include file="$xoops_theme/blocks/theme_blockleft.html"
}
}
}
}
Into the theme I put the following line
<td id="button2"><a {show_hide_blocks}>Elementary</a></td>
I am trying to keep everything simple at this stage(no parameters passed to the function yet) just to get something basic working. I was hoping that the line above would call the function and hide the Elementary multiMenu block. However, it did not and hence this post. I cannot use an onclick in the above line. It doesn't like it I guess because it is a javascript construct. i.e. <td id="button2"><a onclick="{show_hide_blocks}">Elementary</a></td> doesn't work. I haven't been able so far to find a theme or a template that already does what I am attempting. There has to be a simple smarty variable that hides or shows an entire block and a way for the blocks to be located in the same position.
Any help would be appreciated.

This Post was from: https://www.impresscms.org/iforum/viewtopic.php?topic_id=1079&post_id=16049