Announcement

Collapse
No announcement yet.

Using for loop in html file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using for loop in html file

    I cannot seem to find an example of using a basic for loop in an html page
    I am looking to do something like this:

    Code:
    {{ for (var i=1 ; i <= 12; ++i) }}
    {{end}}
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    #2
    I assume you are refering to the liquid tags and not JavaScript. If so, I believe HS follows (or implemented) scriban

    https://github.com/scriban/scriban
    https://github.com/scriban/scriban/b...oc/language.md

    Check it out and see if you can find the correct syntax.

    Hope it helps.

    Comment


      #3
      This looks what you are looking for


      {{~ for $i in 4..9 offset:2 ~}} {{ $i }} {{~ endfor ~}}

      Comment


        #4
        Originally posted by dcorsus View Post
        This looks what you are looking for


        {{~ for $i in 4..9 offset:2 ~}} {{ $i }} {{~ endfor ~}}
        Thank you sir
        Cheers,
        Bob
        Web site | Help Desk | Feature Requests | Message Board

        Comment

        Working...
        X