Skip to content
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

Fluid variables not working #183

Open
Patta opened this issue Nov 12, 2021 · 0 comments
Open

Fluid variables not working #183

Patta opened this issue Nov 12, 2021 · 0 comments

Comments

@Patta
Copy link
Contributor

Patta commented Nov 12, 2021

It seems that variables are not working in fluid templates.

Example:

newsListTestPid setting is working, but the variable pageUid is not.

setup.typoscript

plugin.tt_news {

    useFluidRendering = 1
    
    view {
        templateRootPaths { ... }
        partialRootPaths { ... }
    }

    variables {
        pageUid = TEXT
        pageUid {
            field = pageUid
            ifEmpty.data = TSFE:id
        }
    }

    settings {
        newsListTestPid = {$newsListTestPid}
    }
    
    ...
}

List.html

<f:if condition="{content.news}">
    <f:then>

        <f:if condition="{pageUid} == {conf.settings.newsListTestPid}">
            <f:asset.css identifier="newstest" href="EXT:sitepackage/Resources/Public/Css/newsTest.css" media="all" />
        </f:if>

        <section class="news list">
            <f:for each="{content.news}" as="news">
                ...
            </f:for>
        </section>
    </f:then>
    <f:else>
        ...
    </f:else>
</f:if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant