Use curleybars to insert an image into each topic list item

Answered

2 Comments

  • Richard Barrett
    Comment actions Permalink

    I figured it out so maybe this can help someone else. Here's how I did it. Obviously, replace XX...XX with your own page ID values (hint: it's in the URL) and add your own assets via the sidebar (the same place where the template files, script.js and styles.css is, look at the top) and copy the curlybars asset code.

    <li class="blocks-item topics-item {{#if internal}}blocks-item-internal{{/if}}">

        {{#is id XXXXXXXXXXXX}}
            <img class="xxx" src="{{asset 'xxx.png'}}"/>
        {{/is}}

        {{#is id XXXXXXXXXXXX}}
            <img class="xxx" src="{{asset 'xxx.png'}}"/>
        {{/is}}

        ...

    </li>

    0
  • Nicole - Community Manager
    Comment actions Permalink

    Thanks for coming back and sharing how you solved this, Richard Barrett

    0

Please sign in to leave a comment.

Powered by Zendesk