meta tags for child page and routing

Post Reply
perfecti
Jr. Bludit
Posts: 3
Joined: Fri Apr 05, 2019 12:00 am

Hi, I immediately apologize for my English, I have such a problem

As far as i know in bludit static pages cannot have children

i have parent page 'page' and she has several child pages 'child1', 'child2'

i check url and get the name of the current page 'child1' and output the data using js related to this page

on the 'child1' page, meta tags are not displayed, I can display them using the engine or I need to change them using js

and second question

How to use routing? now i do so

Code: Select all

$ link = explode ('/', $ url -> slug ());
if ($ link [0] == 'page') {
   include (THEME_DIR_PHP.'page.php ');
} else if else if else if else if...
Is this the right approach?
User avatar
Jay
Master Bludit
Posts: 133
Joined: Mon Feb 11, 2019 8:41 pm

Check the output of $WHERE_AM_I variable.
You should be able to load content depending on the page type.
You can also get familiar with $page methods.

As it goes to setting parent it just need a small modification in bludit's core to get this function for all types of pages. Look at github, there's a thread about this.
Andrei
Jr. Bludit
Posts: 4
Joined: Sat Sep 21, 2019 7:08 am
Been thanked: 1 time

Hi,
i'm precisely looking for the "$page methods" list but can't find them.

Could it be possible to create a custom field "template", or "contentType" and load the specific template.php if needed or a generic one if the custom field is empty?

That would be just a temporary solution (hope it can be done) waiting for the official feature to be released.
User avatar
Jay
Master Bludit
Posts: 133
Joined: Mon Feb 11, 2019 8:41 pm

Andrei wrote: Sat Sep 21, 2019 7:50 am Could it be possible to create a custom field "template", or "contentType" and load the specific template.php if needed or a generic one if the custom field is empty?

That would be just a temporary solution (hope it can be done) waiting for the official feature to be released.
The feature you ask for is implemented in bludit for quite some time, but there's no info about using it in documentation.
But there are clever users, and they come up with useful solutions so check this thread: viewtopic.php?f=6&t=1416
Andrei
Jr. Bludit
Posts: 4
Joined: Sat Sep 21, 2019 7:08 am
Been thanked: 1 time

Hi :)
i've done it that way:

viewtopic.php?f=14&t=1522&p=7328#p7328

and it works indeed.
Post Reply