routine for increasing menu levels?

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

routine for increasing menu levels?

Post by svasti » Sat Feb 27, 2016 6:00 pm

I just had to add a 4th menu level to a rather full website, where h4, 5h, h6 was used a lot. One has to be rather careful not to mess up the site. First change all h4 to h5 and only afterwards change levels. If you don't do it in this order, the website will be messed up and the pagemanager will regroup some pages making the mess worse (that's what happend).

What about adding a little help routine when setting the levels to a higher value? Because this setting is rather "dangerous" if not done the way it should be done. Besides, usually an additional level is requested, when there are already a lot of pages. So if you do it wrongly, cleaning up the resulting mess is quite time consuming.

I'd propose that changing from 3 levels to 4, would change automatically all h4 to h5, changing from 4 levels to 5 would change h5 to h6, changing from 2 levels to 5 would change all h3, h4, h5 to h6.

What do you think?

Edit: made subject a little clearer

bastingse
Posts: 308
Joined: Fri Jun 06, 2008 9:38 pm
Location: Netherlands
Contact:

Re: routine for increasing menu levels?

Post by bastingse » Sun Feb 28, 2016 8:48 am

I think if i need to do such a big change to a website i would download the contentfile and open it with (for example) Text Wrangler.
Then do a 'search and replace all' for h6 and replace all to h7, then do a 'search and replace all' for h5 and replace all to h6, then do a 'search and replace all' for h4 and replace all to h5... working backwards....
Did that ones in the past and it only took me 5 minuts.

Dit the same when i update an old cmsimple installation and need to move all images from the directory 'images' to 'userfiles > images'. Just a 'search and replace all'....

just my 2 cent...

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: routine for increasing menu levels?

Post by cmb » Sun Feb 28, 2016 9:51 am

svasti wrote:What about adding a little help routine when setting the levels to a higher value?
I agree with bastingse that this is not really necessary, because of CMSimple(_XH)s single content file which can rather easily be edited (even online, if so desired). On the other hand, at least unexperienced users might easily mess up content.htm, so maybe it is a good idea to add some automation. However, I don't see why this can't be done by a plugin (or even an add-on), so it might be reasonable to write such a plugin, and if it turns out to be really useful we still can consider to merge it into the core (similar to what has happened with Restore_XH). Anyway, I suggest to put the issue on the Roadmap (if not already happened).
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: routine for increasing menu levels?

Post by Tata » Sun Feb 28, 2016 3:40 pm

And how about to extend the viewer in pagemanager, so it shows all headings and marks level headings different from headings used in particular pages? Then it would be absolutely safe and simple to drag/dop headings in page manager.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: routine for increasing menu levels?

Post by svasti » Sun Feb 28, 2016 4:48 pm

Would be interesting if one could simulate in pagemanager what would happen, when a menu level is added.
Similar to Tata's proposal a function could also be added like: "Attach page to existing page".

Alternatively we could prepare the standard download for 4 levels (i.e. no h4 headings in the content), and add a sentence saying that before changing the level number the webmaster may want to check the headings in the content so that pages don't break up inadvertently.

bastingse
Posts: 308
Joined: Fri Jun 06, 2008 9:38 pm
Location: Netherlands
Contact:

Re: routine for increasing menu levels?

Post by bastingse » Sun Feb 28, 2016 6:07 pm

Think we have to keep in mind that most of the cmsimple users are 'advanced' users.... people who know what can and can not be done.
So indeed.... a warning that changing headers could mess up a website is a good idea!

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: routine for increasing menu levels?

Post by Tata » Mon Apr 04, 2016 3:00 pm

bastingse wrote:...
So indeed.... a warning that changing headers could mess up a website is a good idea!
It is a routine which I recommend to all users is to look at first at the sitemap to better understand the structure of a website. This would be IMHO the best "warning" before anz changes in the menulevels is done.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply