slackero / phpwcms

Flexible, fast, powerful, customer, developer friendly web content management system and cms framework
http://www.phpwcms.org
GNU General Public License v2.0
92 stars 45 forks source link

Section Sorting is off (Container/Row) #274

Closed marcus-at-localhost closed 5 years ago

marcus-at-localhost commented 5 years ago

I'm trying to figure out how phpwcms contentpart sections are ordered.

I'm using two Bootstrap custom sections and all CPs are wrapped in the right container, but one (the orange one) is in the wrong order and I can't figure it out why.

2019-07-28_18-10-14

I tried to understand this portion of the code https://github.com/slackero/phpwcms/blob/master/include/inc_front/content.article.inc.php#L659 , but the arrays let my head spin.

Is this a bug or a feature?

It looks like one can't mix custom wrappers and maintain the order, since wrapper type gets grouped here: https://github.com/slackero/phpwcms/blob/master/include/inc_front/content.article.inc.php#L675

It should be possible to save the order at that point and use it when Tabs get rendered, but I can't see how right now (without introducing more head spinning helper arrays)

This is a bit of a bummer, since there is no straight forward way to move groups of CP's (.row>.col-4+.col-4+.col+4) in the content area around :/

marcus-at-localhost commented 5 years ago

I figured it out:

I guess the key is to group CP's by section name AND number to maintain order.

image

image

image

image

image

image

Maybe you can print out the section number in the overview

image

slackero commented 5 years ago

I will check

q23 commented 5 years ago

thx