WBCE CMS – Way Better Content Editing.
Du bist nicht angemeldet.
WBCE CMS 1.6.9 verfügbar / available - wichtiges Sicherheitsudate / important security update
I am trying to add a blog page to my website. I am using the News with images module and I want to add the Blog Menu.
The news items are in a left column and the menu should be in a right column. I have added a Code2 section to the page and entered the code as in the ReadMe file. The news item is fine but the right column shows nothing and there is also the rest of the page missing. Looking at the page code it ends after the opening of the right column, there is no further code and the footer is completely missing.
What am I doing wrong please.
Offline
Looking at the page code it ends after the opening of the right column
So most likely there is an exception at this point, which the errorlog viewer should show you more information about ...
And double check the syntax of the code in the Code2 Section.
... nein in Europa verwenden wir beim Programmieren nicht € statt $ ...
Offline
@bernd
Thanks, I've checked this and there was a syntax error. I corrected this and the whole page now displays but the menu is only showing 'EN' ? The error log lists three warnings:
1. /modules/news_img_blog_menu/include.php: L:40
from /modules/code2/view.php L:52 "Undefined variable $section_id"
2. /modules/news_img_blog_menu/include.php: L:57
from /modules/code2/view.php L:52 "Undefined variable $output"
3. /modules/news_img_blog_menu/include.php: L:74
from /modules/code2/view.php L:52 "Undefined variable $section_id"The Code2 entry is:
display_blog_menu(37,0,'<h3>Categories</h3>','<h3>History</h3>',0);
Can you help decipher these? Appreciated.
Beitrag geändert von mikejd (11.12.2022 14:25:12)
Offline
You have to enter the id of the page on which the NWI section is found, not the section_id of the NWI section.
E.g. if your NWI section has the id 37 and is for example on the page 23, you need to call
display_blog_menu(23,0,'<h3>Categories</h3>','<h3>History</h3>',0);
not
display_blog_menu(37,0,'<h3>Categories</h3>','<h3>History</h3>',0);
Offline
To get rid of the "EN", change /modules/news_img_blog_menu/include.php, line 98
$output = LANGUAGE."<ul>".$output."</ul>";to
$output = "<ul>".$output."</ul>";And to fix the $output error, move
$output = "";from line 48 after line 35
$page_id = (int) $page_id;and remove the 2nd $output =""; from line 72.
Beitrag geändert von florian (11.12.2022 17:52:55)
Offline
@florian
I have changed the section ID to the page ID
Removed the LANGUAGE
Moved the $output = ""; from line 48 to after line 35 (now line 36)
There is only one $output = ""; in line 72 so I have left it
Hope this is correct. I have attached the file below. The page now displays a blog menu showing 'History' but not 'Categories'. I assume categories is the same as groups, of which there are three but only one entry.
Page is https://rhyniecharitabletrust.co.uk/pages/blog.php
Thanks for your help.
regards, Mike
Beitrag geändert von mikejd (12.12.2022 14:54:14)
Offline
Couldn't attach a file to above post
Offline
Not sure if your issues are solved?
Regarding attachment problems: It's not possible to attach php files to firum posts "as is", you need to save them as .txt or zip them. Or - if the file does not contain hundereds of lines - just post them as "code".
Offline
Not sure if it's completely solved. It doesn't show the Categories listing. Or is this because I've put the wrong parameter in the call. I thought '0' would show both Categories and History?
Offline
I see. Try with the include.php attached to this post, should work then.
Offline
@florian
Success! Now working fine. Thanks very much for your help.
best regards, Mike
Offline