Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,187
On Slideshare
1,187
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
6
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. ExpressionEngine
    CMS of the future, now
  • 2. What is ExpressionEngine?
    • Content management
    • 3. Member and registration system
    • 4. Development framework
  • Separation of Concerns
    • Weblogs contain data
    • 5. Templates control what data is loaded and how it is viewed
    • 6. Custom functionality implemented in add-ons, called by templates or hooks
  • EE Data
    • All data is stored in weblogs (except member info)
    • 7. Weblog == database table (sort of)
    • 8. Weblogs a.k.a. "channels"
    • 9. Record in a weblog is called an entry
  • EE Data
    Weblogs have three fields by default:
    • Title - user friendly name of the
    • 10. URL Title - "slug" used in the URL
    • 11. Entry ID - unique integer identifier
    Example entry:
    • title = "About Us"
    • 12. url_title = "about-us"
    • 13. entry_id = 56
  • EE Custom Fields
    • All other fields in a weblog are called Custom Fields
    • 14. Custom fields have a Field Type
  • EE Custom Fields
    Built in Field Types:
  • 15. EE Custom Fields
    Additional Field Types:
  • 16. Custom Field Group
    • All custom fields are defined in Custom Field Groups
    • 17. Each weblog can have exactly one Custom Field Group assocaited with it
  • Custom Field Group
    • Prefix field name w/ field group
    • 18. "article" group has "article_body"
    • 19. "recipe" group has "recipe_body"
  • Gypsy
    • Gypsy fields can be defined directly on any number of weblogs
    • 20. Only used for things that are on almost all weblogs, perhaps fields like summary, promo_summary, promo_title
    • 21. Powerful, but avoid if possible
  • EE URLs
    • URLs consist of "URL segments"
    • 22. http://nerdery.com/article/detail/1
    • 23. The first two segments are (usually):
    • 24. segment_1: template group
    • 25. segment_2: template name
    • 26. Other segments are up to the template
  • EE Templates
    • Defined in database through the CP
    • 27. Never edit templates in the CP
    • 28. Templates are grouped by Template Groups
  • EE Templates
    Basics:
  • Plugin / Module Tag
    {exp:weblog:entries}
    • Always starts with exp:
    • 34. "weblog" is the name of the plugin or module
    • 35. "entries" is the method on the class to call
  • Plugin / Module Tag
    {exp:weblog:entries}
    class Weblog {
    function entries() {
    ...
    }
    }
  • 36. Plugin / Module Params
    http://nerdery.com/article/detail/1
    {exp:weblog:entries dynamic="off"
    entry_id="{segment_3}"}
    class Weblog {
    function entries() {
    global $TMPL;
    $entry_id = $TMPL->fetch_param('dynamic');
    // does something with $entry_id
    }
    }
  • 37. Categories
    • Collections of premade labels in Category Groups
    • 38. Any number of Category Groups on a weblog
    • 39. Each entry has multiple categories from it's weblog's assigned Category Groups
    • 40. We're also using tags - slightly different usage, completely freeform
  • Simple Sites
    • Separates content by category
    • 41. All weblogs that have site specific content need the Site Category Group
    • 42. Active site switches between sets of global vars
  • Simple Sites
    {simple_site_id} - set in path.php, identifies which site is active
    Extracted from Simple Sites config array:
    {simple_sites_name}
    {simple_sites_cat_id}
    {simple_sites_domain}
    {simple_sites_*}
  • 43. Simple Sites
    config_common.php
    // no limits on defined vars - {simple_sites_*}
    $conf['simple_sites'] = array(
    'active' = 'y',
    'default_site' => 'main',
    'american_profile' => array(
    'domain' => 'http://americanprofile.com/',
    'name' => 'American Profile',
    'cat_id' => 5,
    'fruit' => 'apples',
    'user_groups => array(1)), ....
  • 44. Simple Sites
    Get 5 articles from the current site:
    {exp:weblog:entries dynamic="off"
    category="{simple_sites_cat_id}"
    limit="5" weblog="articles"}
    <a href="{simple_sites_domain}article/
    detail/{url_title}">{title}</a><br/>
    {/exp:weblog:entries}
  • 45. EE Add-ons
    • Plugins - provide template tags
    • 46. Modules - provide template tags, custom CP pages, and actions
    • 47. Extensions - modifies behavior of other add-ons or core through hooks
    • 48. Fieldtypes - provide new Custom Field Types
  • Hermes
    • The Hermes generator creates empty classes for all of the available add-ons in one package - one mod directory and one ext stub file
    • 49. Always use this unless you just need to do a very simple plugin or extension
  • Hermes
    • Provides enhanced MVC structure w/ real view files
    • 50. Base classes provide utility functions to load settings, set page titles, etc.
  • Loki
    • Provides easier to use styles for use in the CP (replaces Display class)
    • 51. Provides base data classes for use in custom add-ons