[Doubt] Identify Static Page

Post Reply
linhous
Jr. Bludit
Posts: 1
Joined: Wed Jul 31, 2019 5:47 pm

Hi Guys,
I met the wonderful Bludit this week and fell in love with its simplicity, and the power it offers.
I am finishing my site and set up exclusively with bludit.

My doubt is... I have "default" pages and static pages. However, each has a different template CSS.
I am separating this into the index of my theme, like this:

Code: Select all

if ($WHERE_AM_I == 'page') {
	if ($page->type() == 'static'){
		include(THEME_DIR_PHP.'static.php');
	} else {
		include(THEME_DIR_PHP.'page.php');
	}
} else if ($WHERE_AM_I == 'category') {
	include(THEME_DIR_PHP.'blog.php');	
} else {
	include(THEME_DIR_PHP.'home.php');
}
It's working perfectly. But I was wondering if this is the best way to do this.
Thank you so much, and thanks for this amazing tool.
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:

Yes, this can be done like this.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply