Redigering af menu

Et CMSimple support forum for dansktalende brugere og udviklere

Moderator: ZiPs

FT4
Posts: 36
Joined: Sun May 18, 2014 8:30 pm

Redigering af menu

Post by FT4 » Mon Sep 25, 2017 3:41 pm

Hidtil har jeg kunnet redigere min sides menu i HTML, men nu ved jeg ikke hvordan, jeg skal få adgang til den? Jeg har oprettet en ny side, hjorteparken.dk, og kopieret indholdet fra hjortefarmen.net

mvh

Jan C.

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

Re: Redigering af menu

Post by cmb » Mon Sep 25, 2017 4:15 pm

Der er sket en større ændring i CMSimple_XH 1.7. Fra changelog:
The classic CMSimple page splitting has been reworked. Formerly, pages have been split at certain HTML heading elements (<h1>-<h3> by default). Now the pages are split at certain HTML comments instead. That allows to insert arbitrary heading elements on every page, what allows to have a clean heading structure. Also you can now use up to 9 menu levels (at least in theory; the page URLs are likely to become too large with so many menu levels). Furthermore, in normal mode it is not possible to change the names of the pages anymore from the editor; a pagemanager has to be used instead. Advanced users may enable the advanced mode, in which case the HTML split comment is editable in the editor's source code view. Note that the page name is now basically unrelated to the first heading of the page, what makes the alternative heading ("page" tab) unnecessary, so it has been removed.
Den enkle løsning er at bruge Pagemanager ("Pages" eller "Sider").
Christoph M. Becker – Plugins for CMSimple_XH

FT4
Posts: 36
Joined: Sun May 18, 2014 8:30 pm

Re: Redigering af menu

Post by FT4 » Mon Sep 25, 2017 5:07 pm

Jeg HAR prøvet at redigere side navnene med Page Manager, men det afspejler sig ikke i en ændret menu!

lck
Posts: 2955
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Redigering af menu

Post by lck » Mon Sep 25, 2017 6:17 pm

FT4 wrote:Jeg HAR prøvet at redigere side navnene med Page Manager, men det afspejler sig ikke i en ændret menu!
cmb wrote:Der er sket en større ændring i CMSimple_XH 1.7. Fra changelog:
changelog (2.) wrote:Note that the page name is now basically unrelated to the first heading of the page, what makes the alternative heading ("page" tab) unnecessary, so it has been removed.
FT4 wrote:Hidtil har jeg kunnet redigere min sides menu i HTML, men nu ved jeg ikke hvordan, jeg skal få adgang til den? Jeg har oprettet en ny side, hjorteparken.dk, og kopieret indholdet fra hjortefarmen.net
You can activate Advanced-Mode in ./cmsimple/config.php

Code: Select all

$cf['mode']['advanced']="";
set it to:

Code: Select all

$cf['mode']['advanced']="true"; 
So you can see and change in html-code the page name and page-heading e.g.:

Code: Select all

<!--XH_ml1:Start-->
<h1>Start</h1>
Did you use Exchange_XH to transfer the old content to CMSimple_XH 1.7.0?
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

FT4
Posts: 36
Joined: Sun May 18, 2014 8:30 pm

Re: Redigering af menu

Post by FT4 » Mon Sep 25, 2017 8:27 pm

Thanks for the replies. I used Exchange_XH.

Using the Page Manager to change the page title, I get an error 500, Internal Server Error, when I try to save. I uploaded a debug file (_XHdebug.txt). Should I remove that file before editing?

FT4
Posts: 36
Joined: Sun May 18, 2014 8:30 pm

Re: Redigering af menu

Post by FT4 » Mon Sep 25, 2017 8:28 pm

I forgot to ask how to edit in HTML, now the mode is set to advanced.

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

Re: Redigering af menu

Post by cmb » Mon Sep 25, 2017 8:54 pm

FT4 wrote:Using the Page Manager to change the page title, I get an error 500, Internal Server Error, when I try to save. I uploaded a debug file (_XHdebug.txt). Should I remove that file before editing?
Removing _XHdebug.txt is not necessary to work with Pagemanager. I wonder, though, why you get a 500 Internal Server Error. Is there a more detailed error message? Have you consulted Pagemanager's system check (Plugins → Pagemanager)? Is everything reported as OK?
FT4 wrote:I forgot to ask how to edit in HTML, now the mode is set to advanced.
You have to switch the editor to HTML mode (button "kildecode"). There you can see the page heading as part of a HTML comment, like so:

Code: Select all

<!--XH_ml1:Galleri-->
That corresponds to the following in former CMSimple_XH versions:

Code: Select all

<h1>Galleri</h1>
You can edit the menu level ("1") and the page heading ("Galleri") with the same semantics as before.
Christoph M. Becker – Plugins for CMSimple_XH

FT4
Posts: 36
Joined: Sun May 18, 2014 8:30 pm

Re: Redigering af menu

Post by FT4 » Tue Sep 26, 2017 5:44 pm

Thanks for the comments. I have now found out how to see and edit the HTML source code and I have been working all pages over. I found a couple of errors, but I don't get a clear answer to why I get an error message 500. Pagemanager reports of "Irregular page structure found". I get the possibility to press a button "Proceed". But when I do so and want to save, the error 500 etc. appears. I can't see why :(

BR

Jan

lck
Posts: 2955
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Redigering af menu

Post by lck » Tue Sep 26, 2017 8:26 pm

When I look at the source text, I see that there is something wrong. Whether it is related to the 500 error, I do not know.

- at the beginning and end of the template.htm seem to be blank lines
- the Docctype is not current, should be: <! DOCTYPE HTML>
- <head> is included twice, thus also jQuery
- jQuery is not set to the latest migrate and core versions

I would also times the browser cache completely delete and the page several times reload.
cmb wrote:Is there a more detailed error message? Have you consulted Pagemanager's system check (Plugins → Pagemanager)? Is everything reported as OK?
What does the Debug-Mode and the browser-console (e.g. F12 in Chrome) report? Are there any error messages when the 500 error occurs?
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

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

Re: Redigering af menu

Post by cmb » Tue Sep 26, 2017 8:52 pm

FT4 wrote:Pagemanager reports of "Irregular page structure found".
That usually means that there's a gap somewhere, for instance, a 3rd level page directly after a toplevel page (without a 2nd level page).
lck wrote:What does the Debug-Mode and the browser-console (e.g. F12 in Chrome) report?
The browser console will usually not clarify any server side erros, and the debug mode is quite useless in this case, because saving from Pagemanager is done via XHR (aka. Ajax). It might be possible to get some helpful error message, though, by purging _XHdebug.txt (so that it is empty). (See also https://github.com/cmsimple-xh/cmsimple-xh/issues/293.)
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply