Creat-ee ExpressionEngine Training – Part 4

Lesson 4 jumped right into template construction with ExpressionEngine. As I mentioned before, the process is similar to a PHP/Wordpress site, pulling includes and dynamic data through ExpressioneEngine template tags. Template tags are “variable” names enclosed in brackets that allows synchronization between the final html doc and the data included in the backend. Syntax is of tags is simple: anything goes and there’s no clear distinction between “system tags” and “user-created tags” which creates an initial confusion but hopefully with time this system will become easier to understand and remember.

FTP Organization Tip

By default, all files from ExpressionEngine are organizationally distributed inside an ExpressionEngine folder at the root of the server. Our mentor mentioned that for future updates in EE, it is wise to create a second set of folders at the root, starting with an asset folder, which then would include:

  • images folder
    css
  • css folder
  • templates folder
  • scripts folder

This way, if EE folder structure changes in the future, there shouldn’t be too many broken links. EE allows developers to set in the backend preferences for:

  • File upload location preferences – allows for creation of different upload locations for different file types
  • Template location
  • Image upload location

Even if in an update of EE file structure changes, it would be straightforward to remap the file locations and get the site up and running quicker.

Template Bits & Pieces

Here are the various pieces that make up a template in EE:

Template group: Includes
Works just as wp/php includes. We created “mini-templates” that define header, footer, navigation, html open/close tags etc.

Snippets
Snippets are similar to wordpress widgets. Accepts template tags just as templates do. Usually used for very short pieces of content. Not anything that contains xp channel entries. Use Channel for that instead. IE: We created a slogan snippet.

Global Variables
Cannot have same name as other system variables. Can be any small piece of content/numbers/data that gets updated frequently.

Default ExpressionEngine Template Tags
Learning default template tags has been a journey. There’s no “visual” distinction between user-created tags and system tags (comparing php variable names) and a complete list of system tags can be found here . Here are some basic tags that have as a sample:

{site_name} – Set in General Configuration settings can be used in any template
{site_index} – Always points to homepage
{author} – Initial creator of post/entry

Here’s a quick sneak preview of what one of location page template is starting to look like:

Index Sample

Backend Customization in EE

Since the start of training, ExpressionEngine has been all about developers and the backend. It is the central point in EE and it feels that all addons revolve around how to make developers happier and more efficient at both implementation and data entry.

More Addons
Some of these may have been shown before in the training, but now it’s finally fitting into the context of the entire class. Essential adds:

– Low Variables
Helps you manage Global Variables and Snippets in one place.

– Zenbu
Displays additional content next to each entry in the backed (such as related images) which helps users/editors quickly visually identify each posts.

Overall, template creation in EE is truly flexible and straightforward. It requires slight more work to setup than other CMSs I have previously worked with, but the sandbox is inexistent and you as a developer is truly in control of what the final product looks like.

Leave a Comment

 

Recent Comments | 0 Comments
Recent Posts

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.