Jump to content

Move fields within a template possible on edit page?


Relmos
 Share

Recommended Posts

@Raymond Thank's for you quick answer, too.

As I just answered to @diogo the problem ist, that the fieldtypes in my case are already repeaters and nesting is not possible.

I could image a much more flexible case like:

Intro

Video

Text1

Gallery

Text 2

Move:

Intro 

Gallery

Video

Text 1

Text 2

Just now I couldn't image how this would be possible. So by now this isn't possible yet?



I asked this question cause I just saw that Craft has introduced this:

http://buildwithcraft.com/features/matrix

Link to comment
Share on other sites

As its mentioned in the following topic it should not be a problem to nest different repeaters

http://processwire.com/talk/topic/1358-repeater-inside-itself/

Repeaters
should be okay with putting repeater B inside repeater A. But if you
are putting repeater A inside repeater A… all bets are off. :) We'll have to add some extra checking for the folks that need the infinite recursive depth repeater features in their site. :)

Link to comment
Share on other sites

Ok here the real scenario:

Type 1

Repeater

 

Type 2

Repeater

 

Type 3

Repeater

 

Since now the Types are each a fieldtype and hardcoded in the template. 

Now the client wants to be able to add more types and reorder them on demand.

Since there's only the repeater solution now I cannot think of anything different than embed repeater B in repeater A. Or?

Link to comment
Share on other sites

Maybe you'll want to describe the whole thing in more detail? Like the structure of the elements in the page, what the elements are for and such. If anything else, someone here might be able to help you *rethink* how to better implement things. who knows, maybe you don't need a repeater :)

Link to comment
Share on other sites

Sorry to get back to you only now. What I meant is that it sound like a complicated solution and in PW, if it sounds complicated it's because there is a more efficient way. Like pogidude says, tells us what you want to do in more detail so we can help you to have a better structure.

Link to comment
Share on other sites

I've never used repeaters myself, but if these were "regular" input-fields, I'd just add a text- or textarea input field to the template(s). 

Inside these, the editor could list the fieldnames (separated by comma or linebreak), and this would dictate the placement / order of fields in the template.

Convert the "fieldOrder" from text to an array, and just output them in that order in the tpl.

Certainly not as elegant as drag-and-dropping fields in the admin edit area, but simple enough.

I'm not sure though how to access / adress repeater fields though, so that might or might not work for your scenario.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...