[Doubt] Identify Static Page

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

Wed Jul 31, 2019 5:55 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: 1567
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Thu Aug 01, 2019 7:04 pm

Yes, this can be done like this.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
Post Reply