Page 1 of 1

meta tags for child page and routing

Posted: Sat Aug 31, 2019 2:11 pm
by perfecti
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?

Re: meta tags for child page and routing

Posted: Sat Aug 31, 2019 3:54 pm
by Jay
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.

Re: meta tags for child page and routing

Posted: Sat Sep 21, 2019 7:50 am
by Andrei
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.

Re: meta tags for child page and routing

Posted: Sun Sep 22, 2019 11:43 pm
by Jay
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

Re: meta tags for child page and routing

Posted: Thu Sep 26, 2019 7:53 pm
by Andrei
Hi :)
i've done it that way:

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

and it works indeed.