Please note that the forum isn't realy used anymore.

If you have questions, want support or just simply want to talk to us you can find us on slack.

 

Templates not saving tpl file in directory

I can create/edit templates but when I go to use them I get an error and if I check the template directory they are not saved.

what is going wrong??? maybe some permissions need to change?

regards paolo

Hi Paolo,

You can't create new template files from the Fork CMS backend, you need to manually make a new .tpl file with html code. And then you can add that file to Fork CMS by clicking the 'add template' button, so it can use the file you made.

How to add a new template

If you create a theme for Fork CMS, you need to make template (.tpl) files in the theme_name/core/layout/templates folder (and style them with a css file and you have your own theme). These template files contain HTML code for the structure of your page.

Let's say you've just made a new .tpl file in the templates folder that represents your homepage (homepage.tpl for example), then you need to add it to Fork CMS. You go to Settings > Themes > Templates and you make a new one. Here you need to fill in the name of the file you've already created, and add the positions. In each template file, there are a couple of 'position blocks' where the CMS can insert his content. So you need to add all your position blocks that you've used in the tpl file. Finally you need to create a very basic layout in the textbox that represents the page. And then you can use your custom template when you create a new page in Fork CMS :-) !

If you want to make your own theme, you can read the theming guide. You can also learn a lot by going to the Triton theme (default theme) and read through some files to see how the theme is built.

Comment

The forum is deprecated in favor of our Slack channel, which provides real-time support for your issues.

Join us on Slack here: https://fork-cms.herokuapp.com/