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

chad
chad

Is it possible to use a repeater for a Custom Page Field? if so how do you define the fields that would be inside the repeater?

example: {variable name="test" label="Test" tab="Test" type="repeater"}{/variable}

Thanks!

daftspunky
daftspunky

The repeater field works in the Campaign plugin using the {repeater}{/repeater} tags, but the Static Pages plugin does not support array values yet. We might implement this at a later time.

pxpx
pxpx

Hey daftspunk, could you offer up any estimated timeframes at all?

If there isn't too much involved, I may be able to help out but I will need to purchase Campaign Plugin to find out how it's currently setup there I think.

Fibonacci
Fibonacci

pxpx said:

Hey daftspunk, could you offer up any estimated timeframes at all?

If there isn't too much involved, I may be able to help out but I will need to purchase Campaign Plugin to find out how it's currently setup there I think.

+1

pxpx
pxpx

Fibonacci,

There is a pull request pending, but it comes with caveats. https://github.com/rainlab/pages-plugin/pull/95

Cheers, Jon

Fibonacci
Fibonacci

pxpx said:

Fibonacci,

There is a pull request pending, but it comes with caveats. https://github.com/rainlab/pages-plugin/pull/95

Cheers, Jon

Wow, the repeater now appears!

But, when I save the page, I got the following error,

error

Last updated

pxpx
pxpx

Can you show me how you are setting up the repeater in your layout file?

Fibonacci
Fibonacci

I just try like in documentation,

here's my code,

{repeater name="content_sections" prompt="Add another content section"}
    <h2>{text name="title" label="Title"}Title{/text}</h2>
    <p>{textarea name="content" label="Content"}Content{/textarea}</p>
{/repeater}
pxpx
pxpx

What build are you on?

Fibonacci
pxpx
pxpx

Off the top of my head you will need to be on 300 due to the parser. Please give that a go and let me know if you still have problems.

Fibonacci
Fibonacci

pxpx said:

What build are you on?

I have updated to the latest build (For now 304) and it works!

Thank you so much, Jon.

You save my days!

(I'm very glad)

Last updated

pxpx
pxpx

No problem, just be mindful of the tab issues, I am trying to look into a fix at the moment.

Fibonacci
Fibonacci

Please let me know if you or this issues have been fixed by the author.

Thanks, :)

Last updated

Fibonacci
Fibonacci

pxpx said:

Off the top of my head you will need to be on 300 due to the parser. Please give that a go and let me know if you still have problems.

I've got new problem.

I can't use more than one repater in layout. Have you try this? When I click another tab, it's not happened.

For example, I have two tabs like below: content and image

When I click the image's tab, it still on the content's tab or another tab I've clicked. I tried to remove the content repeater and now the image's tab work.

pxpx
pxpx

This was the problem I raised in my previous posts. There is an issue with the tabs and this needs to be modified in the core.

https://github.com/rainlab/pages-plugin/pull/95#issuecomment-146738354

Fibonacci
Fibonacci

Oh, sorry.

I guess the 'misc' tab in repeater.

pxpx
pxpx

Yea, exactly that. It basically means that for every tab within a repeater it sets those ID's against the repeater tabs and then sets different id's against the main tabs, they then dont match and can't open the panels.

Looking into a solution but at the moment my time is very limited.

Fibonacci
Fibonacci

I wish you have more time and can give the solution.

Thanks, Jon..

pxpx
pxpx

This was fixed recently, you will likely need edge updates turned on though.

1-20 of 20

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