Page 1 of 1

[Doubt] Identify Static Page

Posted: Wed Jul 31, 2019 5:55 pm
by linhous
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.

Re: [Doubt] Identify Static Page

Posted: Thu Aug 01, 2019 7:04 pm
by Edi
Yes, this can be done like this.