0

With this parameter in the xml I can add a top link

                    <action method="addLink" translate="label title">
                        <label>Registrati</label>
                        <url>customer/account/create/</url>
                        <title>Registrati</title>
                        <prepare>true</prepare>
                        <position>1</position>
                    </action>

How do I add the top link only to users logged on or only for users not logged in?

0

Only for logged in users:

<customer_logged_in>
    <reference name="top.links">
        <action method="addLink" translate="label title">
            <label>Registrati</label>
            <url>customer/account/create/</url>
            <title>Registrati</title>
            <prepare>true</prepare>
            <position>1</position>
        </action>
    </reference>
</customer_logged_in>

Only for logged out users:

<customer_logged_out>
    <reference name="top.links">
        <action method="addLink" translate="label title">
            <label>Registrati</label>
            <url>customer/account/create/</url>
            <title>Registrati</title>
            <prepare>true</prepare>
            <position>1</position>
        </action>
    </reference>
</customer_logged_out>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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