Imagine you have a flexible layout with 2 regions in the top row, three regions in middle row and 2 regions in bottom row. Now you realise you need to add a single, full width region between the top row and the middle row..
Maybe i am missing something but all i can to is "add row to bottom" or "add row to top". This is highly annoying, because if i want my single region row to be placed where i want, i have to create it at the bottom, delete all the regions and rows above it and then recreate those rows/regions under...
Isn't there a way to "add a row between" two given rows? That would make layout design much quicker.. especially when trying out different layouts to see what works best.
Hope my description wasn't too confusing!
Simon
| Comment | File | Size | Author |
|---|---|---|---|
| #35 | flexible_panels_rows-665668-35.patch | 10.81 KB | joshf |
| #38 | Before.jpg | 21.04 KB | vipul tulse |
| #38 | After1.jpg | 18.65 KB | vipul tulse |
| #38 | After2.jpg | 31.92 KB | vipul tulse |
Comments
Comment #1
simonswiss commentedComment #2
merlinofchaos commentedDoing this is actually fairly difficult from a UI perspective because once you say between, you now have to say between what, which means there needs to be a way of selecting which location to insert it into. Tricky.
Comment #3
merlinofchaos commentedChanging status.
Comment #4
benanne commentedsubscribing, this is biting me pretty hard at the moment because I already used the existing panel names in my stylesheet, and they will all change after I add a new row in the middle of the page.
Comment #5
billypea commentedre; merlinofchaos:
"Doing this is actually fairly difficult from a UI perspective because once you say between, you now have to say between what, which means there needs to be a way of selecting which location to insert it into. Tricky."
How about if, once a new row was added to the top or bottom, that row could then be moved up or down between the other rows? Either by clicking "Move Up" and "Move Down" buttons, or in a fashion similar to how Blocks lets you reorder blocks, or how Views lets you reorder fields.
Panels is great and I'm sure it'd be completely insane to add this functionality, but this way you might not have say 'between what' and could just say 'after the next one'.
Comment #6
Vote_Sizing_Steve commentedHow about adding a row to the bottom, but allowing that row to then be moved up?
Comment #7
awolfey commentedHere is a patch that lets you choose where to position a new row.
Left to do:
- Update the settings form and submit to rearranage the rows when editing an existing row's settings.
- Clean up code / efficiency.
I may have some more time for this, but here's a start for anyone with interest.
Comment #8
yesct commentedsubscribe
I wanted to do that. add a new row top or bottom is fine, but then I need to be able to move it up or down...
Comment #9
rtsang commentedWhat if we add a menu item "Insert a row region" under each "Row" menu? The row should know it's current row number and where to put the new region.
Comment #10
joinso commentedHi!
Anyone use the patch?
We apply the patch and we can set the row position, but the rows doesn't move to their position setting after we save it.
Any idea?
Regards!
Comment #11
joinso commentedHi!
I find new information.
When you change the values for row position, the changes are not comitted.....
Any idea?
Regards!
Comment #12
raincloud commentedI found this patch for version 3.7 - does it mean it was fixed in 3.9 ? (but I have upgraded to version 3.9 of panels but can't see any new way to insert row between existing rows). I don't know how to apply the patch.
Comment #13
merlinofchaos commentedNo, it's marked 'needs work' meaning it isn't in a state that can be committed. The person who posted the patch did not have time to complete the work, so a developer is needed to get this code good enough to be committed.
Since flexible.inc is pretty bad code to begin with, that really just means make sure it works and does everything it needs and won't cause problems.
Comment #14
awolfey commentedI'm about to start another project where this may come in handy, so there's some chance I can pick it back up.
Comment #15
khiminrm commentedSubscribe. This feature for this great module would be a very usefull. Need this feature for Drupal 7.
Comment #16
perhenrik commentedIs there any progress on this? Or is there any workaround that allow the addition of rows or regions without renaming all others? I know this is old, and for D6, but Isn't this an isssue for D7 as well?
Comment #17
marktheshark commented+1
Is there any way to insert a row in the middle of an existing layout without having to start over?
Comment #18
tomas.teicher commentedSame problem in D7
Comment #19
MTecknology commentedStill an issue in D7. Updating last version tested with.
Comment #20
Rakesh Acharya commentedIt's very hard and time consuming to recreate a whole layout for adding a row in between ... please find a solution for this
Comment #21
maartendeblock commentedA workaround is creating a row at the bottom and then exporting the variant.
Pretty high up you will see something like this:
The children are the rows, move the last row up to the desired position:
Make sure you update the number!
Copy the alle the code and click 'Import variant' on top and past the code. A new variant will be created with your row on the correct position.
Delete (or disable to be safe) the old variant.
Comment #22
dman commentedThanks for the tip on re-arranging things with an export @maartendeblock.
I was also able to proof-read a bunch of settings to fix a bunch of things, and re-machine-name things more consistently by editing the array that with the UI.
Altogether a win.
Comment #23
truyenle commented+subscribe for drupal 7
Comment #24
jsimonis commentedI guess I'll have to try out the export way of doing it. This has been a huge hassle for a site that is under development. Where the rows are placed has been changed multiple times. Which means that I have to kill a bunch of rows and completely recreate them since there is no ability to just move row 5 up to row 2, for instance.
Comment #25
michael2hands commentedHey there,
My company needed this feature, so I worked on it. I uploaded a patch - it is unrefined, but works for us and our needs.
What I did was take up where awolfey left off on their "rung" position concept and uploaded my own patch file. It adds a 'rung' property to flexible layout plugin so that user can set/edit the order that rows appear within a column in Admin Layout designer.
The next step will be to make the UI draggable, like how regions are draggable when Layout designer is hidden.
Best,
Michael Fuery
Basic usage is:
Comment #26
michael2hands commentedComment #27
michael2hands commentedI hope the community will review and comment on the patch. Thank you! :)
Comment #28
awolfey commentedUnassigning myself after all the years...
Comment #29
michael2hands commentedNeeded to fix so works with layouts with more than one column.
Comment #30
michael2hands commentedNOTE this is for an older version of panels: 7.x-3.5 - It would be easy to convert to latest 7.x version, let me know if anyone would like that.
Changes:
- Added a hook for panels_flexible_render_item_alter()
Comment #31
scottfalkingham commentedHi Folks,
Building off michael2hands's latest patch. This patch:
- Updates to 7.x-3.9.
- Fixes a couple bugs that insert/move rows to wrong positions.
- Rearrange row positions after editing an existing row's settings without requiring to save the panel.
Comment #32
scottfalkingham commentedHi Folks,
Building off michael2hands's latest patch.
Patch 31:
- Updates to 7.x-3.9.
- Fixes a couple bugs that insert/move rows to wrong positions.
- Rearrange row positions after editing an existing row's settings without requiring to save the panel.
Comment #33
joshf commentedA slightly smaller patch was added by @scottfalkingham but I'm unclear as to what it does. The filename ends with -31 but there's no accompanying comment.
Comment #34
joshf commentedThis is an update of the patch from #30 which makes the diff relative to the module directory instead of the site root.
Comment #35
joshf commentedThis is a reroll of #30 that applies cleanly to 7.x-3.9.
Comment #36
avpadernoI re-published the comments from scottfalkingham, unpublished from the antispam module used on Drupal.org. (In this case, it was a false positive.)
Comment #37
vipul tulse commentedComment #38
vipul tulse commentedPatch #30 by scottfalkingham working fine.
After applying the patch it removes add row bottom and top from the list and adds an option to row with add row popup it provides row position dropdown which that you can set your new row position/ if edit it moves the row, working fine in my proect
Comment #39
vipul tulse commentedComment #40
joelpittetThere is a bunch of dsm() lines in the patch, I'm not sure it's done yet?
Comment #41
narendra.rajwar27Comment #42
narendra.rajwar27@joelpittet, Patches are listed after IS section, in Ascending order of comment. The patch does not include dsm() function now. Please have a look.
Thanks
Comment #43
joelpittetWhoa, that's not typical, thanks @narendra.rajwar27 the order is usually the other way and that threw me for a loop, normally the IS patches are in descending order.
Comment #44
joelpittetAssuming #35 is the RTBC'd patch? I've hidden the rest and reordered them
Comment #45
joelpittetActually so people don't spend too much time on this... I don't plan on committing this as it could be quite disruptive of a change and since I'd prefer to encourage people to move to Drupal 8 I'll be avoiding committing D7 patches that are feature requests(some other maintainer may be more bold than I, but that's my stance).
Comment #46
jsimonis commentedUnfortunately there are still too many needed modules that aren't ready in D8. So many of us are stuck in D7 for quite some time. Hence why the big push to D8 has been moved back. I'd love to have all my sites on D8 right now, but unfortunately it's not possible.
Comment #47
japerryDrupal 7 is no longer supported, closing.