VideoHive

page template + metabox

2945 posts
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Referred between 100 and 199 users
+2 more
duotive says

Hey. Do you know how can i make a page that has a metabox value saved use a particular page template?

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says

So,

do you intend to override the selected page template for that page if a meta value has a specific value?

If that is the case I think that at the beginning of each page template you have to check the meta value of the page and in that case include the specific template and stop the script to complete the current page creation…

2945 posts
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Referred between 100 and 199 users
+2 more
duotive says

Do you know kriesi’s page templates builder? The same idea. Create page templates and then assign them to pages. So you say first to check if it has the meta and then return if it has?

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says
duotive said
Do you know kriesi’s page templates builder? The same idea. Create page templates and then assign them to pages. So you say first to check if it has the meta and then return if it has?

Mmm, well, I guess that’s a different thing… you can make that in many ways. I would leave the default page template as the only template for the pages and then register the modules using the template builder…

In the end those template builders works like shortcodes… a plain page where you put modules to create the layout…

2945 posts
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Referred between 100 and 199 users
+2 more
duotive says

Agreed but we have blog templates and portfolio templates ( page templates both ) and we cannot exclude them + we hate shortcodes and we did not take that approach with the “template builder”

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says
duotive said
Agreed but we have blog templates and portfolio templates ( page templates both ) and we cannot exclude them + we hate shortcodes and we did not take that approach with the “template builder”

The shortcodes are just an example of modular contents :)

Btw, for what I think, if you have a template builder you don’t need templates already defined.

It should work like this:

Plain page -> add blog module

Plain page -> add portfolio module

If the template builder that you have in mind can’t edit the blog and portfolio templates just state that in the help, make it work just with the default template…

If you don’t alert people about that, then they would start to add modules to a blog template to then see their work voided by your script. So, just don’t allow the builder to those templates.

2507 posts Put a Donk On It
  • Attended a Community Meetup
  • Beta Tester
  • Bought between 10 and 49 items
  • Contributed a Tutorial to a Tuts+ Site
  • Elite Author
  • Exclusive Author
  • Has been a member for 3-4 years
  • Interviewed on the Envato Notes blog
+5 more
ThemeProvince says

You could create your own page templating system like ive done:

http://cl.ly/452H41382V2J02342N2m
2945 posts
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Referred between 100 and 199 users
+2 more
duotive says

@ThemeProvince And that is what? A side meta?

2945 posts
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Referred between 100 and 199 users
+2 more
duotive says
ParkerAndKent said
duotive said
Agreed but we have blog templates and portfolio templates ( page templates both ) and we cannot exclude them + we hate shortcodes and we did not take that approach with the “template builder”

The shortcodes are just an example of modular contents :)

Btw, for what I think, if you have a template builder you don’t need templates already defined.

It should work like this:

Plain page -> add blog module

Plain page -> add portfolio module

If the template builder that you have in mind can’t edit the blog and portfolio templates just state that in the help, make it work just with the default template…

If you don’t alert people about that, then they would start to add modules to a blog template to then see their work voided by your script. So, just don’t allow the builder to those templates.

I saw that approach but i dislike it because i think about user friendly and shortcodes with a lot of params are not user friendly. Thanks for the advices :)

2507 posts Put a Donk On It
  • Attended a Community Meetup
  • Beta Tester
  • Bought between 10 and 49 items
  • Contributed a Tutorial to a Tuts+ Site
  • Elite Author
  • Exclusive Author
  • Has been a member for 3-4 years
  • Interviewed on the Envato Notes blog
+5 more
ThemeProvince says
duotive said
@ThemeProvince And that is what? A side meta?

Yes, a meta box with context set to the side.

by
by
by
by
by