Best way to manage subpages?

Post Reply
puschmie
Ssr. Bludit
Posts: 10
Joined: Thu Oct 29, 2020 12:12 pm
Location: Vienna
Contact:

Hi all!
I'm new here and hope to become an active member in this community.
I've started working on transfering our website derknoten.wien to bludit a couple of days ago. I'm quite new to web development and so far I had individual html files for all webpages, which is a nightmare to manage. So I was looking around for a lightweight and easy to use open source cms... and found bludit. I'm really loving it so far, but now I'm stuck.

So here is what I'm trying to do:

I'm building a custom theme with the following page structure structure:

-events: static page, list of all events. Every event should have it's own page.
-blog: static page, list of all blog posts. Every blog post should have it's own page.
-contact: static page

The problem I'm having is that I don't know how to seperate pages that are events from pages that are blog posts. Would Categories be the right way to make this distinction? Or should I make all events children of the event overview page and all blog posts children of the blog overview page?

Sorry if this is a stupid question but I've been digging through the documentation and source code for a couple of hours now and I didn't really find out how this should be done.

A related question: Can I have different layouts for the content editor?


Thanks in advance!
Jonas
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

puschmie wrote: Thu Oct 29, 2020 1:04 pm The problem I'm having is that I don't know how to seperate pages that are events from pages that are blog posts. Would Categories be the right way to make this distinction?
You can use categories or tags. And why not use default content for the blog (posts) and static content (pages) for the events? There are several possibilities. You have to figure out which one meets your needs the best.
Can I have different layouts for the content editor?
Do you mean the content editor in the backend or the content in the frontend?
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
puschmie
Ssr. Bludit
Posts: 10
Joined: Thu Oct 29, 2020 12:12 pm
Location: Vienna
Contact:

I've figured something out, thanks for you're help :)
I will post my solution in the next couple of days

The second question was related to the backend.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

puschmie wrote: Tue Nov 03, 2020 7:44 pm The second question was related to the backend.
In this case you can use also the following theme:

https://themes.bludit.com/theme/booty-dark-admin

Or make your own. ;-)
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
puschmie
Ssr. Bludit
Posts: 10
Joined: Thu Oct 29, 2020 12:12 pm
Location: Vienna
Contact:

Okay, thanks, I just asked about that in a plugins thread, but I'll look at the dark theme!

About how I managed to achieve what I was asking about in the first post:

I assigned different categories to my pages and made a static page for each category as an overview. In index.php I check for

Code: Select all

$page->slug()
to figure out what static overview page I'm on, including the according .php files with include(THEME_DIR_PHP.'pagename.php')[/code]. In the same

Code: Select all

if
block I check if am on a page with the

Code: Select all

$WHERE_AM_I
helper variable. If so I include page.php. On the static overview page I check for

Code: Select all

$page->category()
to only display the pages of the category. In page.php I check for the category again, to include .php file as a template for the actual content pages of each of the categories. Because there is one for events, one for a blog and one for javascript/p5 art the templates all need to work differently.

I think something similar could have been achieved using url filters but I tried and couldn't get it working that way.
I explained everything in some detail, because I learned a lot and think that someone of similar low experience level like me could benefit from this aswell.

Thank you :)
and regards from Vienna
puschmie
Post Reply