Templating Questions

Trying to get started with Pulse. I’ve used many cms’s before, so php/html knowledge isn’t a problem. I just don’t understand the pulse templating process. Can someone clarify step by step how I would template if using my own php files and if setting it up totally within Pulse? I’ve watched the video and read the How to template page several times, but there seem to be gaps in the info.

From a previously existing php page:

  • I just want to insert a few blocks into an existing page
  • Do I just need to add this in the php file, where I want the content to appear? <?php include("content/blocks/home/main.txt"); ?>
  • Where do I place this php file? At the root level of the site? In the template folder?
  • And where do the css/js folders go?
  • If I use this technique, I don’t need to add anything in the pages section of the admin?
  • I can still add the blog feature this way as well?

From within the Pulse Admin/Pages:

  • Create a php file like layout.php
  • Create a Page in the admin
  • Insert only the html code in the Page that contains the layout/content for that particular page
  • Assign the php template file to the page, like layout.php
  • Within the template file, this code: <?php echo $parsedown->text($content); ?> pulls in the content that is stored in the Page (as set up in the admin)?

I’d prefer to just use my own php files and insert blocks that clients can edit from the admin, but I can’t seem to get that working.

Sorry for the confusion. Once I get past this, I think I will like Pulse. I used version 3 a bit, but then moved away from it.

2 Likes

Okay, I figured out a few things.

In the page editor where you can select the template from a dropdown list, it was not saving the one I selected. By adding {{template:home}} to the Page code, it did use the alternate, desired template.

I’m on my way. :slight_smile:

2 Likes

Fixed in 5.0.2! :smiley::+1:
http://help.pulsecms.com/article/10-version-history