Page 2 of 3
Re: listing posts on a static page
Posted: Thu Aug 06, 2020 11:40 am
by diego
The bug affect only if you don't set the slash at the end.
Go to Settings > PREDEFINED PAGES > Homepage > Type the page name you want to set as homepage > Save button
Go to Settings > URL FILTERS > Blog > /test/
Go with the browser to >
http://yourdomain.com/test/
This works, the only doesn't work is the redirect
http://yourdomain.com/test to here
http://yourdomain.com/test/
Re: listing posts on a static page
Posted: Sun Oct 11, 2020 8:40 pm
by Jay
diego wrote: ↑Thu Aug 06, 2020 11:40 am
This works, the only doesn't work is the redirect
Edi wrote: ↑Tue Aug 04, 2020 8:56 pm
You have to set a page as mainpage, otherwise it does not work.
I had some time to update bludit instance from 3.9.0 to latest 3.13.1
Basically showing blog posts on a fixed subpage works.
Mine usecase is a bit different, and I really hoped this would work out of the box as mentioned by both of you earlier.
What am I really trying to achieve is to show 2-3 latest blog posts on index page + some static content, with a link to all blog posts under domain/blog, where all blog posts get the real uri like: domain/blog/post1 /blog/post2 etcetera.
Using existing options in bludit, under domain/blog/ every post is being listed, pagination works flawlessly.
The main thing is that all posts' urls still point to
domain/post-uri,
not to
domain/blog/post-uri
which is what I'm trying to achieve
Until now I had it working on default settings (no static homepage set along with filters->blog) after changing a bit core files to be able to set a parent for published pages instead of only static ones. This was working, posts were listed using an additional theme file for it, but I was unable to get a working pagination on a static /blog subpage.
Now with a static page set as homepage and using filters->blog, all posts having a parent set - which is a static /blog/ page - are listed but after clicking on them they show 404 page.
Is there a simple solution to achieve such - I'd say basic functionality of a CMS allowing static and dynamic pages - goal?
At this point I'd need to mess with many core files, and updating bludit in feature would become a nightmare.
Re: listing posts on a static page
Posted: Mon Oct 12, 2020 2:17 am
by Jay
Unfortunately I'm not even able to reproduce the workflow I had in v3.9.0
Every time I try to set a parent (static 'blog' page) for published or sticky page type, it's being automatically converted to static page.
I can't find the function(?) responsible for this behaviour.
Do you know where should I look for?
Re: listing posts on a static page
Posted: Mon Oct 12, 2020 1:22 pm
by Edi
Jay wrote: ↑Sun Oct 11, 2020 8:40 pm
I had some time to update bludit instance from 3.9.0 to latest 3.13.1
Basically showing blog posts on a fixed subpage works.
A fixed subpage, whatever this would be, to show blog posts, is not supported by Bludit.
What am I really trying to achieve is to show 2-3 latest blog posts on index page + some static content, with a link to all blog posts under domain/blog, where all blog posts get the real uri like: domain/blog/post1 /blog/post2 etcetera.
Perhaps it's possible to add another template for the content or page shown as main page.
domain/blog/post1, /blog/post2 etc. can perhaps be set with .htaccess.
Re: listing posts on a static page
Posted: Mon Oct 12, 2020 1:26 pm
by Edi
Jay wrote: ↑Mon Oct 12, 2020 2:17 am
Every time I try to set a parent (static 'blog' page) for published or sticky page type, it's being automatically converted to static page.
A content or page for a blog (with the title "Blog" and the filter
/blog/) is a static content or page.
Re: listing posts on a static page
Posted: Mon Oct 12, 2020 11:09 pm
by Jay
Edi wrote: ↑Mon Oct 12, 2020 1:22 pm
A fixed subpage, whatever this would be, to show blog posts, is not supported by Bludit.
I just...don't know how to respond.
Fixed - a selected page bound to a certain behaviour.
Fixed isn't a type of page existing in bludit like static, published, sticky etc.
I probably didn't express myself clearly.
Edi wrote: ↑Mon Oct 12, 2020 1:22 pm
Perhaps it's possible to add another template for the content or page shown as main page.
domain/blog/post1, /blog/post2 etc. can perhaps be set with .htaccess.
index page isn't basically a problem. Showing for example last 3 published pages is simple, along with setting a different template file.
The thing I can't jump over is getting the /blog/postX url after setting a different page as homepage along with filters.
Pointing to .htaccess might be a solution. I need to try that out.
But I just feel that once I find out the right rewrite rules, all the rest static pages will be messed up
Edi wrote: ↑Mon Oct 12, 2020 1:26 pm
A content or page for a blog (with the title "Blog" and the filter
/blog/) is a static content or page.
It's kind of default bludit's behaviour (since v3.1?) and is understandable. Once a page gets a parent, it's converted to the same type of page.
In this example setting a static page as parent for a published page, the published page is converted to static type.
I'd like to disable such automatic switch, to have the possibility to set a static parent also for published page. in v3.9 it was pretty easy. Now , when the backend progressed pretty much since that version I wasn't successful in finding the code responsible for this "feature".
Re: listing posts on a static page
Posted: Tue Oct 20, 2020 9:39 pm
by Dave
Hello together,
I am using latest version of Bludit v3.13.1 and ask for help concerning the issue with advanced blog settings. I just want to display posts on a static page like
www.mydomain.com/blog/
I already tried this advice
viewtopic.php?t=1092 but I can't follow the instructions due to deactivated URL-Filter settings in the advanced filter section. Means the field "Blog" in URL-Filter settings is deactivated and I can't put the mentioned "/blog/" into the field. Post listings only appear at homepage. How to make it more dynamic.
Thanks in advance
Dave
Re: listing posts on a static page
Posted: Tue Oct 20, 2020 11:18 pm
by Edi
First set at "Settings" > "General" in the tab "General" at "Predefined Pages" > "Homepage" a static content or page as homepage.
If this is done in the same tab at "URL filters" for Blog the filter /blog/ ist activated. Now you can create a static content or page with the title "Blog" where the posts are shown.
Re: listing posts on a static page
Posted: Wed Oct 21, 2020 11:14 pm
by Dave
Hey Edi thanks for your fast reply. This will help. Additionally i did it even more flexible: I created a blog-page or event-page and listed pages related to a particular category e.g. "blog", "event" etc. This makes it independent from posts and static pages. Bludit rocks! Regards Dave
Re: listing posts on a static page
Posted: Wed Oct 28, 2020 1:22 am
by Jay
Jay wrote: ↑Mon Oct 12, 2020 11:09 pm
When setting a static page as parent for a published page type, the published page is converted to static type.
I'd like to disable such automatic switch, to have the possibility to set a static parent also for published page. in v3.9 it was pretty easy. Now , when the backend progressed pretty much since that version I wasn't successful in finding the code responsible for this "feature".
I've finally managed to somehow disable this function, and at last I'm able to set a parent pages for published ones without getting them converted to the same type after every save, or editing database manually.
If anyone needs to disable this function just comment 1 line in bl-kernel/pages.class.php
Code: Select all
// Parent
// This variable is not belong to the database so is not defined in $row
$parent = '';
if (!empty($args['parent'])) {
$parent = $args['parent'];
// $row['type'] = $this->db[$parent]['type']; // get the parent type
}
might firstly require to save a draft before setting the parent page in options, and hopefully this "fix" doesn't break anything