Page 1 of 1

[SOLVED] Simple blog as homepage

Posted: Wed Mar 01, 2023 8:04 am
by krisalyd
Hi,
Page to display on homepage do not show the possibility to select blog page (plugin simple blog).
Is there a way to make blog as homepage ?
Ready to make any test ;)

wondercms 3.4.1
sky 3.2.3
summernote editor 3.4.1
simple blog 3.2.3

[work around solved] Re: Simple blog as homepage

Posted: Sat Mar 04, 2023 2:12 pm
by krisalyd
Well, I found a workaround...

In plugins/simple-blog/class.SimpleBlog.php, I commented out lines 155 to 152 :
// Add blog menu item :: COMMENTE POUR NE PAS APPARAITRE DANS LE MENU
// $extra = $this->active ? 'active ' : '';
//
// $args[0] .= <<<HTML
// <li class="{$extra}nav-item">
// <a class="nav-link" href="{$this->Wcms->url($this->slug)}">Blog</a>
// </li>
//HTML;

and, in data/database.js, I set "slug" for munuItems 0 at "blog" :
"menuItems": {
"0": {
"name": "home",
"slug": "blog",
"visibility": "show",
"subpages": {}
},

After that, there is a message complaining that this page does not exist when editing blog page, but it works anyway.

Re: Simple blog as homepage

Posted: Tue Mar 07, 2023 10:42 am
by wiz
Hello Krisalyd.

Since WonderCMS doesn't officially support this yet, the easiest way would be to open your database.js and change the

Code: Select all

"defaultPage": "blog",
.

Re: [SOLVED] Simple blog as homepage

Posted: Tue Mar 07, 2023 3:20 pm
by krisalyd
Thank you Wiz,

I set "defaultPage": "blog", and :

"menuItems": {
"0": {
"name": "home",
"slug": "",

slug = "" so it could help to avoid duplicate content.
No more message complaining that this page does not exist when editing blog page :-)