Custom template for the pages
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 78 times
- Contact:
The function is not yet implemented.
But you can modify the if conditions in the file index.php of your theme.You can for example use an own template contact.php for your contact page with the following:
But you can modify the if conditions in the file index.php of your theme.You can for example use an own template contact.php for your contact page with the following:
Code: Select all
if ($WHERE_AM_I == 'page') {
if ($page->slug() == 'contact') {
include(THEME_DIR_PHP.'contact.php');
} else {
include(THEME_DIR_PHP.'page.php');
}
} else {
include(THEME_DIR_PHP.'home.php');
}
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Ok.
I did like this:
Bludit 3.8.1 pro
I did like this:
Code: Select all
if ($WHERE_AM_I == 'page') {
if ($page->template()) {
include(THEME_DIR_PHP.$page->template().'.php');
} else {
include(THEME_DIR_PHP.'page.php');
}
} else {
include(THEME_DIR_PHP.'blog.php');
}
- Torsten_Kelsch
- Legend Bludit
- Posts: 263
- Joined: Thu Aug 27, 2015 10:24 pm
- Location: Germany
- Has thanked: 4 times
- Been thanked: 2 times
- Contact:
Nice workaround, but it would be better if editors could choose the template in the backend while creating a page (if there are different templates in the theme). Some CMSs offer such a function, and it makes the CMS really flexible, regarding the design.
On Error GoTo Bed
-
- Jr. Bludit
- Posts: 4
- Joined: Thu Sep 05, 2019 11:37 am
How do we assign a menu structure to the static content (pages)? Using the pro version, I cannot assign another static parent to the content after choosing static as the format.
- Torsten_Kelsch
- Legend Bludit
- Posts: 263
- Joined: Thu Aug 27, 2015 10:24 pm
- Location: Germany
- Has thanked: 4 times
- Been thanked: 2 times
- Contact:
Static content cannot have child pages.ehandelsforeningen wrote: ↑Sun Sep 08, 2019 3:33 pm How do we assign a menu structure to the static content (pages)? Using the pro version, I cannot assign another static parent to the content after choosing static as the format.
On Error GoTo Bed