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

The template parser fail when we have cascaded if markups and first condition is false #35

Open
dervishe- opened this issue Dec 6, 2014 · 1 comment

Comments

@dervishe-
Copy link
Owner

When in a same template we have some if cascaded like here the template parser failed to analyze the bloc when the if conditions are not matching. For instance if there's no donate option, the parser will just considere:

<if placeholder="App:Donate:HasDonationOptions">
    <aside id="donate_app" class="info">
        <if placeholder="App:Donate:Link">
            <a title="[Text:Donate]" href="[App:Donate:Link]">[Text:Donate]</a>
        </if>

as a first bloc

<if placeholder="App:Donate:FlattrLink">
    <a title="[Text:Donate]: [Text:Flattr]" href="[App:Donate:FlattrLink]">[Text:Donate]: [Text:Flattr]</a>
</if>

as the second, and

<if placeholder="App:Donate:BitcoinAddress">
    <div title="[Text:Donate]: [Text:Bitcoin]">
        <span>[Text:Bitcoin]</span>
        <span>[App:Donate:BitcoinAddress]</span>
    </div>
</if>

Then, it remain this code:

    </aside>
</if>

This happend when App:Donate:HasDonationOptions is false.

@dervishe- dervishe- added this to the Version 0.2 milestone Dec 6, 2014
@dervishe-
Copy link
Owner Author

Temporary workaround in the bootstrap theme (file app_details.tpl) avoiding the if cascade

dervishe- pushed a commit that referenced this issue Dec 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant