Are you looking for the latest documentation?

Documentation for Acquia Cohesion V6.0 onwards has moved to https://cohesiondocs.acquia.com

    Pattern repeater element

    Use the Pattern repeater element to create layouts with repeating patterns. The Pattern repeater will repeat whatever is within it a set number of times or indefinitely.

    When using the Pattern repeater, It's important that the total number of times that you set View items to repeat within your View template, matches the number of results you've set your View to return within the Views user interface.

    Locating the pattern repeater element

    To find the Pattern repeater element:

    1. Navigate to a page or template with the Layout canvas
    2. Click the + button on the Layout canvas
    3. Within the Elements tab, look for the Pattern repeater element.

    pattern-repeater.png

    It includes these configuration settings:

    Repeat

    This sets the number of times you want a pattern to repeat. It includes the following field:

    • Number of times to repeat - Enter the number of times you want the pattern to repeat. Leave blank to make it repeat indefinitely. 

    Condition

    This sets a condition to say if the Pattern repeater should apply. If the condition is not met, the pattern repeater will not show. You can use this to create View template layouts which differ depending on the View results page number. It includes the following fields: 

    • If - Sets the context
    • Is - Sets the condition
    • Value - Sets the value

    An example condition could be:

    If (page) Is (equals) Value (1) then apply this repeater.

    This configuration would make any content within the Pattern repeater only show on the first page of your View.

    You can use multiple Pattern repeaters and View items within the same View template. This allows you to create View templates with complex layouts.

    Comments

    DX8 knowledge base icon

    Frequently asked questions

    Get instant answers to common questions. Available online 24/7.

    Find answers

    Raise a ticket icon

    Raise a support ticket

    To raise a ticket, sign into Acquia Cloud and select Help in the top menu.

    Raise support ticket

    Acquia

    Copyright © 2020 Acquia, Inc. All Rights Reserved. Drupal is a registered trademark of Dries Buytaert.