promoted article widget with section name & link

6 Comments

  • Vladan Jovic
    Comment actions Permalink

    Hi Nilesh, maybe this helps? ;)

    <div>
    {{#each categories}}
      {{! CMS  promoted articles }}
          {{#each sections}}
          <h2>{{name}}</h2>
    <ul>
            {{#each articles}}
             {{#if promoted}}
          <li>
            <a href="{{url}}">{{title}}</a>
          </li>
             {{/if}}
           {{/each}}
    </ul> {{/each}} {{/each}} </div>
    0
  • Nilesh Prajapati
    Comment actions Permalink

    Hi Vladan

    Thank you for response.

    I have playing around with the following approach but I unable to workout how to included section name and url within list item as shown in my example.

     

    0
  • Vladan Jovic
    Comment actions Permalink

    Here is an example of what I've got with the following code: https://marbelboards.zendesk.com/hc/en-us

    You can copy easily CSS/JS that is needed for this. If you still have issues I can write a tutorial in the next few days.

    0
  • Nilesh Prajapati
    Comment actions Permalink

    Hi Vladan

    Just to let you know, I manage to get section name working from marbelboards example.

    Thank you for your help :D

    Thanks,

    Nilesh

    0
  • Vladan Jovic
    Comment actions Permalink

    Hey Nilesh, I'm very glad to hear that!! I think that is not easy task at all, you rock!

    0
  • Maria McDowell
    Comment actions Permalink

    Nilesh, would you be willing to share your full solution, JS and home_page.hbs? 

    0

Please sign in to leave a comment.

Powered by Zendesk