I have modifyed taskbar.html in this way (and also main.inc.php adding config var flag_admin).
<div id="taskbar">
<roundcube:button command="mail" label="mail" class="button-mail" />
<roundcube:button command="addressbook" label="addressbook" class="button-addressbook" />
<roundcube:button command="settings" label="settings" class="button-settings" />
<roundcube:button command="logout" label="logout" class="button-logout" />
<roundcube:if condition="config:flag_admin == true" />
<roundcube:button command="admin" label="admin" class="button-admin" />
<roundcube:endif />
</div>
Condition in var_dump debugging is working (switching config var true or false), but
the content of if condition is always displayed (not switch).
Someone is able to do this? :eek:
My debugging is based on rcube_template.php modifying
private function xml_command($command, $str_attrib, $add_attrib = array())
{
$command = strtolower($command);
$attrib = parse_attrib_string($str_attrib) + $add_attrib;
var_dump($attrib);
echo 'command: '.$command."\n";
echo 'check: '.$this->check_condition($attrib['condition'])."\n\n";
// empty output if required condition is not met
if (!empty($attrib['condition']) && !$this->check_condition($attrib['condition'])) {
echo "\nRitorna vuoto!!\n";
return '';
}
so I can see that condition is working (eg false) but in the next call to xml_command
is still visible.
Why?