Using the Template Manager

by Skyler Katz | Last edited: 12/19/2016

You’ve downloaded the Starter Set and created your main templates (home, default page, articles, etc.) to match your designs. Once you have moved them to your staging web server, they need to be made available to the CMS. This is done via the Template Manager.

MonkCMS allows admins and content managers to select templates for individual Pages, Blogs, Sermons, Products, Newsletters, Playlists and Booklists directly from the control panel (Figure 1).

Figure 1

templatemanager1

These Template dropdown lists are populated by the templates that have been set up in the Template Manager, so even though you may have templates sitting on your server the CMS won’t “see” them until you add them to this list.

Figure2

templatemanager2

To add new templates to the Template Manager:

  1. In the control panel, go to Content > Templates
  2. Click on “Add a New Template” to open the Template Editor (Figure 2)
  3. Name should be the user-friendly name. This is the label that will appear in the Template dropdowns.
  4. File name is that actual name of the PHP file on the server
  5. Description is optional
  6. Enabled? allows you to select the modules you want this template to be available to
  7. Use as Default Template? specifies which modules will show this template as default in the dropdown
  8. Use as Search Template should only be checked for a custom template you have set up to display Search results

Once you have specified the File Name, the system will automatically look for that template on your server. If you have specified any dynamic Sections in the template, the Sections area will allow you to specify a default Section to use. This behaves just like the Use as Default Template options, where you can select which Section will appear by default in the module. The user can always change this later.

If you are adding multiple templates, on step 2 above, select the "Bulk" tab instead. The system will scan for all template files in the root FTP folder of your site.

You are now ready to begin replacing the static test content in your templates with the dynamic API calls.

Template Sections not appearing?

If your template has any include files in the code, that do not actually exist on the server, the template manager will fail to register any Sections.

 

Next Article >> The getContent()