Templates

Templates for Sum CMS simply hold HTML with certain placeholders. Depending on which template you are modifing, you will have different placeholders.

Template variables are provided within the "_templates.php."


$Templates = array(
  'BlogEntryTemplate' => '
  [[SplashImgURL]]
  [[Title]]
  [[Content]]
[[Author]] [[Date]] [[SocialShare]] [[CommentWrap]] ',
'BlogTemplate' => ' [[PageURL]] [[Title]] [[Excerpt]] ',
'PageTemplate' => ' [[SplashImgURL]] [[Title]] [[Content]] ',
'CommentTemplate' => ' [[Avatar]] [[WebURL]] [[Username]] [[Date]] [[Comment]] ',
'CommentFormTemplate' => ' [[Alert]] <input id="IDCMS_input_Username" type="text"> <input id="IDCMS_input_Email" type="text"> <input id="IDCMS_input_WebURL"type="text"> <textarea id="IDCMS_input_Comment"></textarea> [[Captcha]] <input id="IDCMS_input_Captcha"> <button id="IDCMS_input_Submit" type="submit" value="Comment">Submit Comment</button> ',
'CommentWrap' => ' [[Comments]]
[[CommentForm]] ', 'ContactTemplate' => ' [[Title]] [[Content]] ',
'ContactFormTemplate' => ' [[Alert]] <input id="IDCMS_input_FullName" type="text"> <input id="IDCMS_input_Email" type="text"> <input id="IDCMS_input_Subject" type="text"> <textarea id="IDCMS_input_Comment"></textarea> [[Captcha]] <input id="IDCMS_input_Captcha" type="text"> <button id="IDCMS_input_Submit" value="Contact">Send Message</button> '
);

**NOTE** - The template variables carrying the array CAN NOT be renamed to anything else. This will cause an error in the builder file.

Use the template list below to determine which placeholders you are able to use.

Blog & Blog Entry
Placeholder Description
[[Author]] Optional - Returns author's name.
[[AuthorEmail]] Optional - Returns author's email.
[[AuthorURL]] Optional - Returns author's URL.
[[AuthorFacebook]] Optional - Returns author's Facebook URL.
[[AuthorTwitter]] Optional - Returns author's Twitter URL.
[[AuthorLinkedIn]] Optional - Returns author's LinkedIn URL.
[[AuthorBio]] Optional - Returns author's bio.
Blog Only
Placeholder Description
[[Paging]] Optional - Returns a Paging Build.
Blog Entry Only
Placeholder Description
[[SocialShare]] Optional - Returns social network share links.
[[Comments]] Optional - Returns comments only.
[[CommentForm]] Optional - Returns Comment Form Template only.
[[CommentWrap]] Optional - Returns Comment Wrap Template with options of including Comments & Comment Form.

 

Page, Blog, & Blog Entry
Place Holder Description
[[PageURL]] Optional - Returns full URL of the current entry.
[[SplashImgURL]] Optional - Returns full URL of the current entry splash image.
[[WebsafeTitle]] Optional - Returns the current entry web safe title.
[[Title]] Optional - Returns the current entry title.
[[Content]] Optional - Returns the current entry content.
[[Excerpt]] Optional - Returns the current entry content excerpt.
[[Date]] Optional - Returns the date in which the current entry was created.

 

Comment
Place Holder Description
[[Avatar]] Optional - Returns the Gravatar using the provided email address.
[[Username]] Optional - Returns the provided username.
[[Email]] Optional - Returns the provided email.
[[WebURL]] Optional - Returns the provided web URL.
[[Comment]] Optional - Returns the provided comment.

 

Comment Form
Place Holder Description
[[Alert]] Required - Returns any alert messages.
[[Captcha]] Required - Returns Captcha image.
Input ID Description
IDCMS_input_Username Required - To receive provided username.
IDCMS_input_Email Required - To receive provided email.
IDCMS_input_WebURL Required - To receive provided web URL.
IDCMS_input_Comment Required - To receive provided comment.
IDCMS_input_Captcha Required - To receive the provided Captcha code and prevent spam.
IDCMS_input_Submit Required - To submit form. MUST USE "Comment" AS VALUE.
Comment Wrap
Place Holder Description
[[Comments]] Optional - Returns comments only.
[[CommentForm]] Optional - Returns Comment Form Template only.

 

Contact Form
Place Holder Description
[[Alert]] Required - Returns any alert messages.
[[Captcha]] Required - Returns Captcha image.
Input ID Description
IDCMS_input_FullName Required - To receive provided full name.
IDCMS_input_Email Required - To receive provided email.
IDCMS_input_Subject Required - To receive provided subject.
IDCMS_input_Comment Required - To receive provided comment.
IDCMS_input_Captcha Required - To receive the provided Captcha code and prevent spam.
IDCMS_input_Submit Required - To submit form. MUST USE "Contact" AS VALUE.
Contact
Place Holder Description
[[Title]] Optional - Returns "Contact" title.
[[Content]] Optional - Returns Contact Form Template only.

 

Continue to Paging Build.