alex
alex

Reputation: 644

conditions in extbase / fluid TYPO3

im trying to check if the given variable is true or not so i can show different links to the user

<f:if condition="{response.isAuthenticated} == true">
    <f:then>
        <a href="{response.logoutURL}">logout</a>
    </f:then>
    <f:else>
        <a href="{response.loginURL}">login</a>
    </f:else>
</f:if>

the above snippet always returns true

what am i doing wrong ?

im using TYPO3 6.1.3 this a part of an extension built with the extension manager

Upvotes: 0

Views: 1042

Answers (3)

Ajay Gohel
Ajay Gohel

Reputation: 128

<f:if condition="{response.isAuthenticated}">
        <f:then>
            <a href="{response.logoutURL}">logout</a>
        </f:then>
        <f:else>
            <a href="{response.loginURL}">login</a>
        </f:else>
</f:if>

Upvotes: -1

Philipp
Philipp

Reputation: 11

Please try

<f:security.ifAuthenticated>
Your Code
</f:security.ifAuthenticated>

Worked for me using TYPO3 6.1.7

Upvotes: 1

Mikhail Timofeev
Mikhail Timofeev

Reputation: 2169

Did you try:

<f:if condition="{response.isAuthenticated}">

?

Upvotes: 1

Related Questions