list article: start from certain number in list index
  • Vote Up0Vote Down Micz FlorMicz Flor
    Posts: 184Administrator
    i have this issue:

    i need to list 9 articles and group them in three columns. i also need to "drop" the first 5 articles from the list. can i start a list at a certain index using contraints?

    this is what i start with:

    {{ list_articles length="14" ignore_issue="true" ignore_section="true" order="bypublishdate desc" constraints="onfrontpage is on" }}

    the articles listed need to be like this:

    index 1 to 5 - DROP
    6 - column1
    7 - column2
    8 - column3
    9 - column1
    10 - column2
    11 - column3
    12 - column1
    13 - column2
    14 - column3
  • 1 Comment sorted by
  • Don't know if I understand your question well, but I do something like this all the time in El Faro. The code is something like this:

    i.e. if you want to start your list from the second article of your list and finish it on the fifth, this is what I do:

    {{ list_articles length="5" constraints="OnFrontPage is on" order="byIssue desc bySectionOrder asc" ignore_issue="true" }}
    {{if $gimme->current_list->index > 1}}
    ///(Here goes the code for calling your article)///
    {{/if}}
    {{ /list_articles }}
    
    


    Don't know if it's clear enough or if this is what you want, feel free to ask if you have any doubts.

    I'll be publishing some of this tips on the spanish forum soon.