[SOLVED] Simple blog as homepage

Ask for help or provide support to other members.
Post Reply
krisalyd
Posts: 7
Joined: Wed Mar 01, 2023 5:16 am

[SOLVED] Simple blog as homepage

Post 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
Last edited by krisalyd on Tue Mar 07, 2023 3:21 pm, edited 2 times in total.
krisalyd
Posts: 7
Joined: Wed Mar 01, 2023 5:16 am

[work around solved] Re: Simple blog as homepage

Post 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.
User avatar
wiz
Posts: 749
Joined: Sat Oct 30, 2010 12:23 am

Re: Simple blog as homepage

Post 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",
.
krisalyd
Posts: 7
Joined: Wed Mar 01, 2023 5:16 am

Re: [SOLVED] Simple blog as homepage

Post 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 :-)
Post Reply