FFOCUS LAB
{ }
DOCUMENTING
EXPRESSIONENGINE
Contributing to the sanity of developers everywhere
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
A BIT OF CONTEXT...
Documentation for managing content on
your site is important an...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
A BIT OF CONTEXT...
But that’s not the kind of documentation
we’re talking about to...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
Documentation for you.
The developer.
And other developers.
A BIT OF CONTEXT...
4
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
WHY DOCUMENT?
5
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
Consider these scenarios:
‣ Coming back to an old project after 1 year
‣ New team m...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
We all provide a service whether it is to a
client or an organization employing us....
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
It’s responsible.
Good for you.
Good for your client or organization.
WHY DOCUMENT?...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
HOW DO I
DOCUMENT?
9
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
‣ Whatever is quick and efficient for you
‣ Don’t spend too much time on this
‣ Use ...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
Easy to read.
Easy to update.
HOW DO I DOCUMENT?
11
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
HOW DO I DOCUMENT?
‣ Plaint Text
‣ Textile
‣ Markdown
‣ Whatever your IDE
syntax hi...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
HOW DO I DOCUMENT?
Textile in TextMate in Preview Mode ( ⌃⌥⌘ P )Textile in TextMate...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
HOW DO I DOCUMENT?
Go to Symbol in TextMate Textile document ( ⇧ ⌘ T )
14
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
WHAT TO
DOCUMENT
15
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
Anything that may change from one
site to another.
WHAT TO DOCUMENT
16
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
In ExpressionEngine, that means we
have our work cut out for us.
WHAT TO DOCUMENT
17
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
‣ Server Environments
‣ Channels & Related Groups
‣ Member Groups
‣ Templates & Gro...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
SERVER
ENVIRONMENTS
19
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
If your site exists in multiple
environments, you need to document
the differences ...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
‣ Environment software versions
‣ PHP/Apache library/module requirements
‣ config.ph...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
SERVER ENVIRONMENTS
22
h2. Server Environments
mysite.com is running in 4 environme...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
SERVER ENVIRONMENTS
23
(continued from previous slide)
+*Production*+
* Located at ...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
CHANNELS &
RELATED GROUPS
24
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
CHANNELS & RELATED GROUPS
More than one way to
skin a cat
Note: I do not condone th...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
‣ How a Channel relates on the front end
‣ How a Channel uses Categories
‣ Are the ...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
‣ Custom Field Groups relating to Channels
‣ 3rd Party Fieldtypes & existing usage
...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
CHANNELS & RELATED GROUPS
28
h2. Channels & Related Groups
Our site currently has 2...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
CHANNELS & RELATED GROUPS
29
+*Blog*+
This Channel is (obviously) the site's blog. ...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
MEMBER GROUPS
30
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
‣ Group permissions & uses
‣ Who has Control Panel access?
‣ Any SAEF’s in action
‣...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
MEMBER GROUPS
32
h2. Member Groups
Our site is maintained by a couple of developers...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
TEMPLATES &
GROUPS
33
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
Two places to document:
‣ In our master documentation file and
‣ In-line comments in...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
Master documentation file
‣ Brief overview of templates groups
‣ Use of Snippets
‣ U...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
TEMPLATES & GROUPS
36
h3. Template Group / Template Structure
* embeds
** embeds/_h...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
TEMPLATES & GROUPS
37
h3. Global Variables
There are only a few Global Variables in...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
In-line template commenting
‣ Forget about HTML tidiness.
‣ With EE in play you wil...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
Browsers don’t care how “pretty” it is.
Let go of your inner-geek in this instance....
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
‣ EE comments are your friend.
‣ They don’t get parsed to the HTML
‣ Using a syntax...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
TEMPLATES & GROUPS
‣ Start every template with
a comment header
‣ When is the templ...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
‣ Document even the tiniest template
‣ Don’t assume you’ll remember how it
works
‣ ...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
Sample Snippets
TEMPLATES & GROUPS
43
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
{!--
Our body tag will always have a class including our country_seg global variabl...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
TEMPLATES & GROUPS
{!--
Run a conditional to check if we're on a parent category or...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
TEMPLATES & GROUPS
{!--
/**
* EE Template Notes
* account/index is the default temp...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
TEMPLATES & GROUPS
{!--
/**
* EE Template Notes
* embeds/_masthead is a hidden temp...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
3RD PARTY ADD-ONS
48
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
Document any 3rd Party Add-ons that
alter front-end output.
Document any 3rd Party ...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
Front-end examples:
‣ Structure
‣ Low Variables
‣ NavEE
‣ Super Search
‣ NSM Transp...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
Back-end examples:
‣ Structure
‣ Low Variables
‣ NavEE
‣ Solspace Calendar
‣ NSM Pu...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
3RD PARTY ADD-ONS
52
h2. 3rd Party Add-ons
We are only using a handfull of Add-ons ...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
3RD PARTY ADD-ONS
53
h3. NSM Transplant
We are using "NSM Transplant":http://expres...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
OTHER
CONSIDERATIONS
54
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
‣ Multi-site manager use
‣ Custom add-ons
‣ Additional PHP libraries for CI/EE
‣ An...
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
ANY QUESTIONS?
56
@ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010
THANKS!
Erik Reagan
Owner & Lead Developer
Focus Lab, LLC
focuslabllc.com
erikreaga...
Upcoming SlideShare
Loading in...5
×

Documenting ExpressionEngine

7,424

Published on

Slides from Documenting ExpressionEngine from the EngineSummit 2. Discuss the need and approaches to building developer-focused documentation for EE sites.

Published in: Technology
1 Comment
9 Likes
Statistics
Notes
No Downloads
Views
Total Views
7,424
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
56
Comments
1
Likes
9
Embeds 0
No embeds

No notes for slide

Documenting ExpressionEngine

  1. 1. FFOCUS LAB { } DOCUMENTING EXPRESSIONENGINE Contributing to the sanity of developers everywhere
  2. 2. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 A BIT OF CONTEXT... Documentation for managing content on your site is important and worthy of an equally stimulating presentation. 2
  3. 3. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 A BIT OF CONTEXT... But that’s not the kind of documentation we’re talking about today. 3
  4. 4. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 Documentation for you. The developer. And other developers. A BIT OF CONTEXT... 4
  5. 5. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 WHY DOCUMENT? 5
  6. 6. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 Consider these scenarios: ‣ Coming back to an old project after 1 year ‣ New team member needs the rundown ‣ You drop development for musical theater WHY DOCUMENT? 6
  7. 7. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 We all provide a service whether it is to a client or an organization employing us. Our practices should serve their best interest. WHY DOCUMENT? 7
  8. 8. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 It’s responsible. Good for you. Good for your client or organization. WHY DOCUMENT? 8
  9. 9. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 HOW DO I DOCUMENT? 9
  10. 10. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 ‣ Whatever is quick and efficient for you ‣ Don’t spend too much time on this ‣ Use a format all developers can use HOW DO I DOCUMENT? 10
  11. 11. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 Easy to read. Easy to update. HOW DO I DOCUMENT? 11
  12. 12. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 HOW DO I DOCUMENT? ‣ Plaint Text ‣ Textile ‣ Markdown ‣ Whatever your IDE syntax highlighter displays legibly Textile in TextMate 12
  13. 13. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 HOW DO I DOCUMENT? Textile in TextMate in Preview Mode ( ⌃⌥⌘ P )Textile in TextMate 13
  14. 14. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 HOW DO I DOCUMENT? Go to Symbol in TextMate Textile document ( ⇧ ⌘ T ) 14
  15. 15. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 WHAT TO DOCUMENT 15
  16. 16. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 Anything that may change from one site to another. WHAT TO DOCUMENT 16
  17. 17. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 In ExpressionEngine, that means we have our work cut out for us. WHAT TO DOCUMENT 17
  18. 18. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 ‣ Server Environments ‣ Channels & Related Groups ‣ Member Groups ‣ Templates & Groups ‣ 3rd Party Add-ons WHAT TO DOCUMENT 18
  19. 19. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 SERVER ENVIRONMENTS 19
  20. 20. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 If your site exists in multiple environments, you need to document the differences & how you handle them. SERVER ENVIRONMENTS 20
  21. 21. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 ‣ Environment software versions ‣ PHP/Apache library/module requirements ‣ config.php ‣ 3rd Party Add-on paths ‣ e.g. ED ImageResizer or FieldFrame SERVER ENVIRONMENTS 21
  22. 22. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 SERVER ENVIRONMENTS 22 h2. Server Environments mysite.com is running in 4 environments. Local copies are on each independent developer's computer. There is a private Development and private Staging environment and a public Production environment. +*Local*+ * Specific to each developer. * Developers are encouraged to run the latest stable versions of PHP and MySQL +*Development*+ * Located at dev.mysite.com * PHP version 5.2.14 * MySQL version 5.0.84 * Apache 2.2.17 +*Staging*+ * Located at staging.mysite.com * PHP version 5.3.2 * MySQL version 5.0.91 * Apache 2.2.17
  23. 23. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 SERVER ENVIRONMENTS 23 (continued from previous slide) +*Production*+ * Located at mysite.com * PHP version 5.3.2 * MySQL version 5.0.91 * Apache 2.2.17 h3. Cross-environment config.php This site uses the 3rd Party NSM Config Bootstrap by Leevi Graham of Newism. You can find more information on that multi-environment approach "here":http://expressionengine-addons.com/nsm-config- bootstrap Included in the config_bootstrap.php file we also set the path for the 3rd Party plugin "ED ImageResizer":http://github.com/erskinedesign/ED-Imageresizer This may also be helpful for creating a multi-server environment config.php base file: http:// eeinsider.com/articles/multi-server-setup-for-ee-2/
  24. 24. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 CHANNELS & RELATED GROUPS 24
  25. 25. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 CHANNELS & RELATED GROUPS More than one way to skin a cat Note: I do not condone the skinning of cats. 25
  26. 26. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 ‣ How a Channel relates on the front end ‣ How a Channel uses Categories ‣ Are the Categories shared across any Channels? ‣ Does any Channel use multiple Categories? ‣ How Status Groups are used ‣ Are you allowing content “previews” with Statuses? ‣ Any other non-standard uses? CHANNELS & RELATED GROUPS 26
  27. 27. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 ‣ Custom Field Groups relating to Channels ‣ 3rd Party Fieldtypes & existing usage ‣ Any custom written FIeldtypes? ‣ Publish Layout Overview CHANNELS & RELATED GROUPS 27
  28. 28. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 CHANNELS & RELATED GROUPS 28 h2. Channels & Related Groups Our site currently has 2 Channels using a total of 1 Category Group. Each Channel has its own Custom Field Group. Every Channel uses the default Status Group. +*Pages*+ This Channel is for our site's static content. It houses things like About Us and Contact. * No Categories are used * The primary Template used for this Channel's content is site/_pages * Default Status Groups is used * 3 Custom Fields are used ** page_extra_meta (Textarea, not required, searchable, no formatting, using Textarea so content manager can input multiple full meta tags since they know how) ** page_banner (Text Input, not required, not searchable, no formatting, uses file chooser) ** page_content (Textarea, required, searchable, XHTML formatting) The 3rd Party Add-on "Structure":http://buildwithstructure.com is in large use for our Pages Channel. We use it to build the heirarchy of Pages and also the HTML Titles, Menus & Breadcrumbs on the front-end. Pages are primarily run through the template site/_pages (configurable per page and within the Structure settings). There are a few pages that have their own custom templates which is mentioned below in the Templating section of this document.
  29. 29. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 CHANNELS & RELATED GROUPS 29 +*Blog*+ This Channel is (obviously) the site's blog. It is a pretty generic blog setup. * 1 Category Group is used * The Channel has it's own Template Group with a few templates * The default Status Group is used * 6 Custom Fields are used ** blog_meta_description (Text Input, not required, searchable, no formatting) ** blog_introduction (Textarea, required, searchable, XHTML formatting) ** blog_thumbnail (Text Input, not required, not searchable, no formatting, uses file chooser) ** blog_tags (Text Input, not required, searchable, no formatting, basic implementation of "tags" for our entries) ** blog_gallery (Matrix with File Chooser & Text Input, Maximum of 10 rows) ** blog_full_content (Wygwam, uses standard toolbar & Default Upload Directory for uploads) The Blog has the following pages on the site: * Blog landing page (/blog) * Archive page (/blog/archive) * Authors Page (/blog/authors) * Categories list (/blog/categories) * Single Entries (/blog/blog-title-here) Each template used in the pages above are discussed in more detail in the Tempalting section of this document.
  30. 30. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 MEMBER GROUPS 30
  31. 31. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 ‣ Group permissions & uses ‣ Who has Control Panel access? ‣ Any SAEF’s in action ‣ Any member spam prevention in place MEMBER GROUPS 31
  32. 32. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 MEMBER GROUPS 32 h2. Member Groups Our site is maintained by a couple of developers. The content is reviewed by a site Editor. The blog articles are written by a combination of the site Editor and guest authors. Thus our _utilized_ Member Groups are: * *Super Admins* - obviously the developers on the site with full access to everything * *Editors* - The site editor. Publish/Edit access to all Channels, can edit categories, access to Structure, the works. They also have access to Member management so they can add/edit the "guest authors" at will. *NO* access to Templates, other Modules, Any admin preferences etc. * *Authors* - Guest authors. Publish/Edit access to _their_ entries in the Blog channel. Cannot edit categories or access Structure. When they create blog entries the Status is set to Closed so the Editor can review before posting to the site. Authors do still have access to the Control Panel for the management of their entries. Other default Member Groups are not widely used. There is no site registration so "Allow New Member Registration" is set to "No" and all "guest authors" are registered manually by the Editor.
  33. 33. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 TEMPLATES & GROUPS 33
  34. 34. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 Two places to document: ‣ In our master documentation file and ‣ In-line comments in our templates TEMPLATES & GROUPS 34
  35. 35. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 Master documentation file ‣ Brief overview of templates groups ‣ Use of Snippets ‣ Use of Global Variables ‣ Any access restriction in play? TEMPLATES & GROUPS 35
  36. 36. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 TEMPLATES & GROUPS 36 h3. Template Group / Template Structure * embeds ** embeds/_header ** embeds/_footer ** embeds/_main_menu * site ** site/index (home page only, hardcoded Pages entry) ** site/_pages (default Structure Pages template) * blog ** blog/index (blog landing page) ** blog/categories (list of categories & entry count, links to pages like /blog/category/tech) ** blog/authors (list of our authors, nothing special) ** blog/_entry (single blog entry page, the default blog entry template in Structure) ** blog/archive (archive by month for our blog entries) * specific_pages ** specific_pages/_contact (Structure: template with contact form used only for our Contact Page) ** specific_pages/_map (Structure: template with interactive map used only for our Map page) ** specific_pages/_social (Structure: template with multiple social RSS feed integrations only used for our Social page)
  37. 37. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 TEMPLATES & GROUPS 37 h3. Global Variables There are only a few Global Variables in play across this site. They are all set in our config bootstrap. The most common use is running a template conditional to see what environment we are in. For example, we only load our statistics tracking script if we're in our production environment so that might look like this: <code> {if env == 'prod'} // Javascript inserted here {/if} </code> h3. Inline Commenting We heavily comment our templates in-line when there are unclear steps or chunks of code. For specifics on what each template does open each template. Each template starts with a commented bit of info including the purpose of the template, the cache settings, PHP mode (if applicable) and potential embedded variables.
  38. 38. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 In-line template commenting ‣ Forget about HTML tidiness. ‣ With EE in play you will have either ‣ clean EE templates or ‣ clean end-result markup ‣ Your EE templates should be easy to read TEMPLATES & GROUPS 38
  39. 39. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 Browsers don’t care how “pretty” it is. Let go of your inner-geek in this instance. Accept “messy” markup. TEMPLATES & GROUPS 39
  40. 40. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 ‣ EE comments are your friend. ‣ They don’t get parsed to the HTML ‣ Using a syntax-highlighting IDE will help them standout ‣ Use them in big blocks or single lines TEMPLATES & GROUPS 40
  41. 41. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 TEMPLATES & GROUPS ‣ Start every template with a comment header ‣ When is the template used? ‣ What Channels use this template? ‣ If PHP is enabled be sure to specify that 41
  42. 42. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 ‣ Document even the tiniest template ‣ Don’t assume you’ll remember how it works ‣ Don’t assume someone else will understand it TEMPLATES & GROUPS 42
  43. 43. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 Sample Snippets TEMPLATES & GROUPS 43
  44. 44. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 {!-- Our body tag will always have a class including our country_seg global variable It may also include an id or additional classes which would be embedded variables passed by other templates --} <body{if embed:body_id} id="{embed:body_id}"{/if} class="{country_seg}{if embed:body_class} {embed:body_class}{/if}"> {!-- We add in Google Analytics if we're in our Production environment. See config.php --} {if app_env == 'prod'} <script type="text/javascript"> // GA Javascript junk here </script> {/if} {!-- page-specific embeds based on the Structure page_slug --} {if '{exp:structure:page_slug}' == 'videos'} {embed='embeds/_videos'} {/if} {if '{exp:structure:page_slug}' == 'user-guides'} {embed='embeds/_guides'} {/if} {!-- End page-specific embeds based on the Structure page_slug --} TEMPLATES & GROUPS 44
  45. 45. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 TEMPLATES & GROUPS {!-- Run a conditional to check if we're on a parent category or not. Parent categories (there are currently 3) have their own template. Use the 3rd Party Low Seg2Cat Extension to get the category parent ID from the URL segment. In our site there are 2 levels of categories. If a Category has a parent ID of “0” then it is a parent. Otherwise it is a child. --} {if '{segment_3_category_parent_id}' != '0'} {embed="products/child_category"} {if:else} {embed="products/parent_category"} {/if} 45
  46. 46. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 TEMPLATES & GROUPS {!-- /** * EE Template Notes * account/index is the default template for the account home page * The region must have "has_cart" set to "y" in path.php to view this page */ --} {if has_cart != 'y'}{redirect=''}{/if} {embed='embeds/_masthead' body_id="account" body_class="page" page_title="My Account" } {embed='embeds/_header'} <div id="main"> {if logged_in} {embed="account/user"} {if:else} {embed="account/login"} {/if} </div> {embed='embeds/_footer'} 46
  47. 47. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 TEMPLATES & GROUPS {!-- /** * EE Template Notes * embeds/_masthead is a hidden template only used with embeds * Potential embedded variables passed to it including page_title, body_id & body_class */ --} <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>{if embed:page_title != ''}{embed:page_title} | {/if}{site_name} {country_name}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> {embed:add_meta} <link rel="shortcut icon" href="/images/favicon.jpg" /> {!-- Cache Buster 3rd Party Add-on for ExpressionEngine Checks the save time meta data of a flat file and adds a "cache buster" string to make sure that the user downloads the most recent version This plugin is used on all CSS and JS references on the site @see http://devot-ee.com/add-ons/cache-buster/ --} <link rel="stylesheet" href="{exp:cache_buster file='/css/style.css'}" type="text/css" media="screen" charset="utf-8"/> <link rel="stylesheet" href="{exp:cache_buster file='/css/print.css'}" type="text/css" media="print" charset="utf-8" /> 47
  48. 48. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 3RD PARTY ADD-ONS 48
  49. 49. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 Document any 3rd Party Add-ons that alter front-end output. Document any 3rd Party Add-ons that alter back-end workflow. 3RD PARTY ADD-ONS 49
  50. 50. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 Front-end examples: ‣ Structure ‣ Low Variables ‣ NavEE ‣ Super Search ‣ NSM Transplant 3RD PARTY ADD-ONS 50
  51. 51. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 Back-end examples: ‣ Structure ‣ Low Variables ‣ NavEE ‣ Solspace Calendar ‣ NSM Publish Plus 3RD PARTY ADD-ONS 51
  52. 52. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 3RD PARTY ADD-ONS 52 h2. 3rd Party Add-ons We are only using a handfull of Add-ons that alter the site significantly. They are: * Structure * NSM Transplant * ER Developer Toolbar h3. Structure "Structure":http://buildwithstructure.com is used to better manage the majority of our URLs (foregoing the template_group/template approach EE does out of the box). We use Structure to also help the client see (and easily re-arrange) their site's Pages hierarchy. Structure has some handy tags in use across the site. The HTML Title is built with Structure. The sub navigation is all built with Structure. The primary navigation, however, is not. (That is hard-coded in the embeds/_main_menu template.) Structure allows for the customizing of templates on a per-entry basis. We use that on a few entries and that is the sole reason for the entire "specific_pages" Template Group.
  53. 53. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 3RD PARTY ADD-ONS 53 h3. NSM Transplant We are using "NSM Transplant":http://expressionengine-addons.com/nsm-transplant to cut down on queries across our templates. It allows us to occasionally save pieces of data from within a Channel Entries loop and use it outside that loop later in the template. You can find more on that here: http://expressionengine-addons.com/ nsm-transplant. This only affects our templates, not the back-end. h3. ER Developer Toolbar "ER Developer Toolbar":http://erikreagan.com/projects/er-developer-toolbar/ is just a toolbar shown on the front-end of the website. It is a module with links to pages on the back-end making it easier to develop the site and manage content for the Editor. There are Module settings that allow toolbar configurations for each member group. The toolbar only displays for Super Admins and Editors. More info here: http://erikreagan.com/ projects/er-developer-toolbar/
  54. 54. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 OTHER CONSIDERATIONS 54
  55. 55. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 ‣ Multi-site manager use ‣ Custom add-ons ‣ Additional PHP libraries for CI/EE ‣ Any tie-ins to external sites or services ‣ Any core hacks OTHER CONSIDERATIONS 55
  56. 56. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 ANY QUESTIONS? 56
  57. 57. @ERIKREAGAN. ENGINE SUMMIT 2. OCT 2010 THANKS! Erik Reagan Owner & Lead Developer Focus Lab, LLC focuslabllc.com erikreagan.com @erikreagan / @focuslabllc slides available at slideshare.net/erikreagan F FOCUS LAB { } 57
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×