New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Added v:if, deprecating v:if.condition / v:if.condition.extend #401

Merged
merged 1 commit into from Nov 23, 2013

Conversation

Projects
None yet
3 participants
@danilobuerger

danilobuerger commented Nov 21, 2013

Examples:

<v:if stack="{0: {0: 'foo'}, 1: '==', 2: {0: 'foo'}}">
    <f:then>IF THEN (YES)</f:then>
    <f:else>IF ELSE</f:else>
</v:if>
<v:if stack="{0: {0: 'foo'}, 1: '==', 2: 3}">
    <f:then>IF THEN</f:then>
    <f:else>IF ELSE (YES)</f:else>
</v:if>
<v:if stack="{0: 1, 1: '==', 2: 1, 3: 'AND', 4: 1}">
    <f:then>IF THEN (YES)</f:then>
    <f:else>IF ELSE</f:else>
</v:if>
<v:if stack="{0: 1, 1: '==', 2: 1, 3: 'AND', 4: {0: 1, 1: '!=', 2: 0}}">
    <f:then>IF THEN (YES)</f:then>
    <f:else>IF ELSE</f:else>
</v:if>
<v:if stack="{0: {0: 'foo', 1: '!=', 2: 'bar'}, 1: 'AND', 2: 1, 3: 'OR', 4: {0: 1, 1: '==', 2: 0}}">
    <f:then>IF THEN (YES)</f:then>
    <f:else>IF ELSE</f:else>
</v:if>

NamelessCoder added a commit that referenced this pull request Nov 23, 2013

Merge pull request #401 from hmspl/if
[FEATURE] Added v:if, deprecating v:if.condition / v:if.condition.extend

@NamelessCoder NamelessCoder merged commit 839c7c3 into FluidTYPO3:master Nov 23, 2013

1 check passed

default The Travis CI build passed
Details

@danilobuerger danilobuerger deleted the if branch Nov 23, 2013

@dextar1

This comment has been minimized.

Show comment
Hide comment
@dextar1

dextar1 Mar 12, 2015

how these conditions will be written if i needed {Error1} =! NULL || {Error2} =! NULL || {Error3} =! NULL

dextar1 commented Mar 12, 2015

how these conditions will be written if i needed {Error1} =! NULL || {Error2} =! NULL || {Error3} =! NULL

@NamelessCoder

This comment has been minimized.

Show comment
Hide comment
@NamelessCoder

NamelessCoder Mar 12, 2015

Member

{v:if(stack: {0: Error1, 1: '||', 2: Error2, 3: '||', 4: Error3})} (off the top of head). See also https://fluidtypo3.org/viewhelpers/vhs/master/IfViewHelper.html

Member

NamelessCoder commented Mar 12, 2015

{v:if(stack: {0: Error1, 1: '||', 2: Error2, 3: '||', 4: Error3})} (off the top of head). See also https://fluidtypo3.org/viewhelpers/vhs/master/IfViewHelper.html

@dextar1

This comment has been minimized.

Show comment
Hide comment
@dextar1

dextar1 Mar 12, 2015

Curly Brackets are not needed? i am sending data from Controller like {NameError}

dextar1 commented Mar 12, 2015

Curly Brackets are not needed? i am sending data from Controller like {NameError}

@NamelessCoder

This comment has been minimized.

Show comment
Hide comment
@NamelessCoder

NamelessCoder Mar 12, 2015

Member

No curly braces needed. If Fluid sees a plain string without quotes used as argument, it assumes you mean an ObjectAccessorNode to access that variable.

Member

NamelessCoder commented Mar 12, 2015

No curly braces needed. If Fluid sees a plain string without quotes used as argument, it assumes you mean an ObjectAccessorNode to access that variable.

@dextar1

This comment has been minimized.

Show comment
Hide comment
@dextar1

dextar1 Mar 12, 2015

thats great. thank you very much :-)

dextar1 commented Mar 12, 2015

thats great. thank you very much :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment