-
Notifications
You must be signed in to change notification settings - Fork 136
Proper way to assign a custom template to a page in the CMS? #51
Comments
Would I do something like this:
and then create a file |
This is exactly what I would do. I like to think about root files as some way of "controllers". They receive data and delegate to templates. In most simple websites they probably will only contain a call to the PS. It's maybe only an example, but for a homepage, I would switch WordPress reading settings to "static" and go with |
Got it, makes sense! Yeah, the only reason I like to create a special template file for the homepage is because I usually have a lot of ACF field groups that are specific to the homepage design. So I normally create a page in the admin called "Home" and assign it to the homepage template so I can manage all of the custom fields from that page and feed it through the template. I suppose I could store the homepage settings in an ACF Options page and just use Thanks for your help! |
By default, there is no "Template" drop-down in the Page Attributes section when editing a page in the admin.
If I wanted to create a new template, let's say Homepage Template, what's the proper way to do that in Tonik?
I can create my template in the root of the theme that contains:
but I feel like that's going against the whole templating system that Tonik uses. Is there another approach that I should be thinking about?
Thanks.
The text was updated successfully, but these errors were encountered: