2
<reference name="top.links">
            <action method="addLink" translate="label title" module="support">
            <label>Support</label>
            <url ifconfig="support_options/support_data/support_pop" ><![CDATA[javascript:div_show();]]></url>
            <title>Support</title>
            <prepare/><urlParams/>
            <position>100</position>
            </action>
            <action method="addLink" ifconfig="support_options/support_setting/support_set" translate="label title" module="support">
            <label>Support</label>
            <url>support</url>
            <title>Support</title>
            <prepare/><urlParams/>
            <position>100</position>
            </action>
        </reference>

I want to pass 2 url at one link and put validation on it

0

1 Answer 1

2

As far as I know there is no such thing.

But the check for ifconfig is in app/code/core/Mage/Core/Model/Layout.php -> function _generateAction:

if (isset($node['ifconfig']) && ($configPath = (string)$node['ifconfig'])) {
    if (!Mage::getStoreConfigFlag($configPath)) {
        return $this;
    }
}

so eventually you can add something like this below the previous code:

if (isset($node['ifnotconfig']) && ($configPath = (string)$node['ifnotconfig'])) {
    if (Mage::getStoreConfigFlag($configPath)) {
        return $this;
    }
}

and to check with:

<action ifnotconfig="..."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.