This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

NPXL
NPXL

I started using OctoberCMS a few days ago and I am trying to use the repeater tag. The code below is written in my layout.htm file (CMS TAB).

<body>
<!-- HEADER PARTIAL -->

<!-- generate the content -->
{% page %}
<div>
{repeater name="item" prompt="Add item"}
    <div class="article-container">
        <div class="carousel-container">
            <img />
            <img /> <!-- add X-amount of Images to the carousel -->
            <img />
            <button class="btn-small">prev</button>
            <button class="btn-small">next</button>
        </div>

        <article>
            <header>{text name="title" label="Title"}Title{/text}</header>
            <p>{textarea name="description" label="Description"}Description{/textarea}</p>
            <button class="btn-gradient">{text name="buttonText" label="ButtonText"}ButtonText{/text}</button>
        </article>
    </div>
{/repeater}
</div>
<!-- content generated -->

<!-- FOOTER PARTIAL -->
<!-- SCRIPTS -->
</body>

In Rainlab's Static Pages -> Pages (PAGE TAB) -> A chosen page: I can see this repeater in the 'misc' tab.

When I fill in the fields and save, I do not see the content rendered in my Static Page. All I see is an empty div that is wrapped around the repeater tag. What am I doing wrong? How do I get this content rendered in my Static Page? I see the key & values added in the viewbag in the static page.htm file.

Thank you for your time.

Last updated

LadyLain
LadyLain

Hello,

i've answered a similar topic right here , maybe it could help you :)

https://octobercms.com/forum/post/nested-repeater-fields-on-static-pages

let me know

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.