2

Sooo I've got a bunch of entries in a channel and the user needs to be able to go through and edit them one by one and move prev and next through them if required.

So, ideally I'd probably nest a channel form tag in a channel entries tag as channel form doesn't provide any kind of pagination, but from what I've read, that isn't a good idea....not sure why....

Any ideas?

  • 2
    Why does the channel entries that generates the next/prev for entries need to be within the channel form? I would think you would add that before or after your channel form. You would only be dealing with pagination within a channel form if you were breaking a single form up into multiple pages. – Romans-8---31-39 Dec 11 '13 at 15:30
2

I've also read that it's not a good idea to put the channel forms tag inside the channel entries tag, but I'm doing it anyway for a site where I couldn't find another solution to the problem I was encountering and it's working.

So I would say (like Romans-8---31-39 said in the comment) try it as a separate tag if possible. If you can't try nesting it and see if it works for your site. If that doesn't work you could have the channel form in an embed.

Ideas about why it's not a good idea: I would guess because you're doubling the query on the database for one thing, but it would also be doing that separating them or using an embed. The other thing is that in the parse order the surrounding channel entries tag gets processed before the channel form entry, and I'm not sure if that entry tags are being parsed by the channel entries tag or the channel forms tag.

| improve this answer | |
  • 1
    I've sort of got it working using Stash, but actually, an embed might make more sense here. Not sure why i haven't tried that tbh! Cheers Johann! – JohnWBaxter Dec 13 '13 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.