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

Not able to get the correct HTML output #117

Open
patrick-steele-idem opened this issue Apr 15, 2014 · 0 comments
Open

Not able to get the correct HTML output #117

patrick-steele-idem opened this issue Apr 15, 2014 · 0 comments

Comments

@patrick-steele-idem
Copy link

I'm trying really hard to include Plates in a guide that demonstrates logic-less templates, but I am not able to get the output that I am hoping for.

Basically, given a template similar to the following:

<ul class="colors">
    <li class="color">
        [COLOR]
    </li>
</ul>

<div class="noColors">
    No colors!
</div>

I'm trying to produce the following output for the given input data:

Input Data:

{
    "colors": ["red", "green", "blue"]
}

Target Output:

<ul class="colors">
    <li class="color">red</li>
    <li class="color">green</li>
    <li class="color">blue</li>
</ul>

Alternatively, with no colors:

Input Data:

{
    "colors": []
}

Target Output:

<div>
    No colors!
</div>

I've tried lots of different map configurations I'm starting to think it is impossible to get the target output with Plates... Any help is greatly appreciated.

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