- Theme Engine
- Design Principles
- Templates
- EVML Reference
- Output
- Comments
- Operators
- Statements and Declarations
- Built-in Functions
- Built-in Objects
- Account
- Address
- Array
- Boolean
- Branch
- Cart
- CartLine
- Category
- CategoryCollection
- CategoryFilter
- CategoryFilterCollection
- CategoryFilterOption
- CategorySearch
- Collection
- Color
- Contact
- Currency
- Date
- Discount
- Dom
- Event
- EventCollection
- EventSlot
- Image
- Layout
- Locale
- Money
- Number
- Object
- Page
- PageCollection
- PageSearch
- PageSharer
- Pagination
- Postage
- Price
- PriceDiscount
- Product
- ProductCollection
- ProductCustomisation
- ProductDownload
- ProductMedia
- ProductMediaFrame
- ProductPrice
- ProductSearch
- ProductSpecification
- ProductSpecificationValue
- ProductVariation
- ProductVariationOption
- RecentlyViewed
- RegExp
- Request
- Review
- ReviewCollection
- Search
- SearchCollection
- SearchResult
- String
- Tag
- Template
- Url
- Website
- EV Tags
- CSS Pre-processor
- Ajax API
while
The while statement creates a loop that executes a code block so long as a condition evaluates to true. The condition is evaluated before executing any statements within a code block.
Syntax
<?ev
while (condition) {
statement
}
?>
Where...
condition | A conditional expression evaluated before each iteration of the while loop. If this condition evaluates to true the statement within the code block is executed. |
statement | One or more statements executed as long as the condition evaluates to true. The code block must be enclosed with curly braces ({ ... }). |
Try it out
<?ev..?>
script blocks. <?ev
var i=0;
while(i++ < 5){
?>
<p>Hello {{ i }}</p>
<?ev } ?>