Creating a Template Page in UpFront Themes

I’m creating a new website in the fixer theme for a client and I’d like to create template pages for future use when they need to add a new page. How can I create template pages for them to choose from?

  • Jude
    • DEV MAN

    Hey Liz

    Currently this is only possible if using the theme builder, which is not currently available and will be released later.

    So for now, if you wish to create a new template you would need to manually do this.

    For a page template, we’ll use the about page as an example.

    In the uf-fixer theme folder.

    You will see a template file called;

    page_tpl-about.php

    Then in /layouts

    you will see a file for single-page-about.php

    You would need to copy both those and rename them. then edit the contents and change the references of about to whatever you name them.

    Hope that helps

    Jude

  • Brett
    • Site Builder, Child of Zeus

    With the latest update you can now add new sections to a page and then check that they are a global section, which then makes them available outside that particular page. Name each section and save.

    Then when you are creating a similar page (say product page) that features the same sections (e.g: page title, sub title, product description, features, cta etc) all you need to do is add each section from the global section dropdown which appears when you click on the + to add a new section. Hope that makes sense(??)

    I stumbled upon this as I wanted to create a product page “template” but as we can’t do that I figured that by creating different global sections you can pretty much do the same thing in a modular fashion.

    Then just go in and edit the content to update the page and you’re done!

  • Liz
    • Design Lord, Child of Thor

    Hey Jude – So I just followed your directions but when I go to create a new page using upfront it’s not showing up in the drop down to choose the new template I created. Do I need to do anything else?

  • Jude
    • DEV MAN

    Hey Liz

    Its in the uf-fixer theme folder, not in the front end of the site. You’ll need to access it via FTP.

    I’d suggest not taking this route unless you are familiar with JSON and advanced PHP.

    You could try this as a workaround as @brett suggested.

    Add new sections to a page and then check that they are a global section, which then makes them available outside that particular page. Name each section and save.

    Then when you are creating a similar page (say product page) that features the same sections (e.g: page title, sub title, product description, features, cta etc) all you need to do is add each section from the global section dropdown which appears when you click on the + to add a new section.

    Its not perfect but works

    Cheers

    Jude

  • Liz
    • Design Lord, Child of Thor

    I was in the FTP, copies those two files and renamed. Was I supposed to do something else? The only reason I need to do it this way is so that my client can create pages the way I have them set up. But I’ll try this fix, could work for now. The other issue I’m running into is when I do create a new page from the two that are there already (which BTW there is no about page just case study and blog) the header and footer revert back to the fixer elements.

    Thanks!

    Liz

  • Brett
    • Site Builder, Child of Zeus

    Just an update on my workaround…

    Once you have set up a new page using the global sections you will have to then go back into each section and then localise them so that any edits aren’t pushed across all pages that feature the global section.

    I’m using this process to basically set up the overall structure of a product section using dummy content and then will go back into each product page and then make local edits. Has saved me a heap of time redoing each page from scratch :slight_smile:

    Still can’t wait for the template builder though :slight_smile:

  • Tyler Postle
    • CGO

    Hey Liz,

    Hope you're having a great weekend!

    The other issue I'm running into is when I do create a new page from the two that are there already (which BTW there is no about page just case study and blog) the header and footer revert back to the fixer elements.

    Do you have it selected as a global region? I've attached a screenshot of where to set this.

    I've done some testing on mine and so far changes are always reflecting in other pages.

    If you're still having the problem do you mind granting support access so we can take a closer look? :slight_smile:

    Look forward to hearing back.

    Cheers,

    Tyler

    PS. Thanks for helping out Brett!

  • Tyler Postle
    • CGO

    Hey Lukas,

    Creating a grandchild theme like that for an Upfront child theme would likely cause many issues. Upfront wasn’t designed to have grand child themes.

    If you’re just making changes inside the Upfront editor then that will be fine, all changes made within the editor is saved to the database so it’s safe during updates; however, if you were wanting to take a crack at editing the actual page template files then that would be overwritten on updates to the child theme.

    We do have an Upfront theme builder that is in the works and will allow you to create your own child themes, including all the page templates too :slight_smile: we don’t currently have an ETA on this but it’s in development now. We do have several other child themes that are in progress too.

    For now, the best way to go is to use global regions, then you can add those to any pages you like.

    Hope that helps!

    Cheers,

    Tyler

  • kev
    • Flash Drive

    Hi Mike,

    I tried using the plugin. I am facing some issues while creating it.

    Can you please tell me the steps to use this plugin. When i tried using it, it is showing some warnings like this:

    Warning: Invalid argument supplied for foreach() in D:Xampphtdocsdrag-and-dropwp-contentpluginsUpfront-Template-Builder-masterupfront-template-builder.php on line 58

    Warning: Invalid argument supplied for foreach() in D:Xampphtdocsdrag-and-dropwp-contentpluginsUpfront-Template-Builder-masterupfront-template-builder.php on line 70

    Can you please help me to get out of this.

    Thanks

  • Mike
    • The Bug Hunter

    That error means you didn’t enter the right page name that saved in database or you didn’t select region to export I think. If I get time I will add some code to make selecting it a bit quicker but for next couple of days I have to finish off this template.

    Here is video showing how I use it. MAclub is my storage key, if your using spirit it is “Spirit”. Not sure what the other ones are. I’ll make that bit better in the next update.

    https://dl.dropboxusercontent.com/u/19226543/usingplugin.mp4

  • Jason
    • Design Lord, Child of Thor

    This feature is actually within the editor now! I updated a few days ago, but just now got around to working with it since then.

    If you create a new page, you can then choose what template you want to use. All of the pages that you have created up until now are available to use as a template. First you will need to know the number of the page, which you can see in the address bar of your browser if you are editing that specific page. So then just select it, hit apply, and bingo!

    Here is what it looks like in case you don't see it.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.