ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Basic Concept and Use of Themes

December 03, 2008 6:25pm

Subscribe [10]
  • #1 / Dec 03, 2008 6:25pm

    spinhirne

    9 posts

    I am learning ee, and it all pretty much makes sense and works great, but I don’t see much in the documentation about themes. Are they an essential and/or integral part of ee? Or, are they just a structural tool used by particular common templates? What do they really do beyond what css typically handles?

  • #2 / Dec 03, 2008 7:30pm

    spinhirne

    9 posts

    I get impatient and guess at the answers to my own questions. Is “theme” just a term borrowed from WordPress referring to a set of linked templates?

  • #3 / Dec 03, 2008 9:24pm

    PXLated

    1800 posts

    Is “theme” just a term borrowed from WordPress referring to a set of linked templates?

    Pretty much 😊
    EE isn’t really themeable in the Wordpress/blog sense.

  • #4 / Dec 03, 2008 9:41pm

    spinhirne

    9 posts

    I feel like I am having to go on a major research mission to find out what an ee theme is. I see someone else had the same questions and issues on Nov. 3. OK, is all that stuff in the themes directory just source for install.php to load into templates for new installs and new template groups?

  • #5 / Dec 03, 2008 9:52pm

    PXLated

    1800 posts

    is all that stuff in the themes directory just source for install.php to load into templates for new installs and new template groups?

    In the themes/site_themes - yep.

  • #6 / Dec 04, 2008 12:52am

    Stephen Slater

    366 posts

    Spinhirne,

    I wouldn’t get too hung up on the term “theme” while trying to learn EE.  Once you understand how template groups and templates work, you’ll understand a theme in the EE sense of the word is just some HTML mixed with EE tags.  Spend time concentrating on how the weblog module works in relation to templates.

    To achieve something similar to WP/Joomla theming in EE, you would use standard CSS (perhaps a JS CSS switcher) instead of a proprietary template system like the others offer.

    I hope this makes sense.

  • #7 / Dec 04, 2008 12:53pm

    spinhirne

    9 posts

    Thanks to everyone for helping me figure our themes. To summarize, 1) themes are used in ee to do initial template loads for new sites and new template groups; 2) often, these newly loaded templates point to graphics files in themes/site_themes.

    If more experienced folks have additions or corrections, love to hear them.

  • #8 / Dec 04, 2008 1:08pm

    Stephen Slater

    366 posts

    1) themes are used in ee to do initial template loads for new sites and new template groups

    Yes, you can do this initially, but keep in mind, it’s not always necessary.  I believe most people’s process to starting a site goes something like this:

    1.)  Grab a pre-built HTML template or build your HTML markup from scratch.  Use placeholders for areas of dynamic content.

    2.)  Build your template_group/template structure inside of EE’s control panel.  Embed templates within other templates for include files such as headers, footers and global navigation.

    3.)  Create your weblogs

    4.)  Replace the placeholders with EE tags inside of your templates

    5.)  Test to make sure data from your weblogs is being generated

    6.)  Rejoice!

    I hope this is helpful and I’m not confusing matters.

    sts

  • #9 / Dec 04, 2008 2:32pm

    fireproofsocks

    51 posts

    EE’s notion of “templates” is a bit of brain stretch… its thought model is exactly opposite how other CMS’s work (e.g. MODx).  Let me try explaining my understanding in the hopes that some people think the same way I do.

    A template in EE is a bit of text that has a URL.  In its simplest form, a template is a complete HTML page, but it can be a page fragment (e.g. a page footer or header).
    A template can be simple static text, e.g. an “about us” page.
    A template can also display dynamic content, e.g. headlines from the last 5 blog posts.
    A template defines how it looks... in other words, if its an HTML page, it’s got CSS and formatting info.

    Why do I say this is back-asswards?  Other CMS’s give the content a URL, while the formatting of that content is arbitrary and easily changed.  Expression Engine’s implementation goes against the grain of MVC design and although it does preserve the separation between formatting & content, it approaches it from the opposite direction.  In EE, you create a view (a template) that lives somewhere on your site, e.g. /china/beijing”, then you slurp arbitrary content into that page.  It’s whacko if you’ve ever worked with other CMS’s.  It’s like handing in your doctoral thesis and calling it “Times New Roman”.  Oh, and by the way, “Times New Roman” is currently displaying the history of CIA involvement in Argentina’s dirty wars.  It really makes my head hurt.

  • #10 / Dec 04, 2008 2:55pm

    Stephen Slater

    366 posts

    Why do I say this is back-asswards?

    Isn’t it bass ackwards? :cheese:

    Other CMS’s give the content a URL

    url_title isn’t a url for the content?

    ...the formatting of that content is arbitrary and easily changed.

    Are you implying the formatting of EE’s content can’t be arbitrary and easily changed?  If so, I’d beg to differ.  Because EE templates rely solely on standardized technologies for structure (HTML), styling (CSS) and behavior (JS), and not some proprietary cluster of “zones,” “spaces,” “blocks” or whatever, it’s as easy to format and change as I’ve experienced.

    Styling a div based on content is as easy as grabbing the {url_title} or {segment_x} and using it as a class or id.

    <div id="{segment_3}"></div>

    Then, all you would need to do is use standard CSS to uniquely format it.

  • #11 / Dec 04, 2008 3:07pm

    fireproofsocks

    51 posts

    Nope, I’m not implying that content can’t be easily changed (well… check that… the organization of the posts could be improved).  EE’s model has nothing to do with whether or not it’s using standardized technologies.  The fact is that the way EE handles templates and content is different than other CMS’s I’ve worked with or the CMS’s that I’ve written.  My opinion of it is that it’s a backwards approach that may take some users some getting used to, thus the post to help others who might be in the same boat.  If EE’s way of doing things makes good sense to you, great.  I assure you that others struggle with its design and its limitations.

  • #12 / Dec 04, 2008 3:18pm

    Stephen Slater

    366 posts

    Cool.  I’m aware others struggle with EE.  I was one of them once and my questions were in no way to undermine your post.  Web designers are drawn to EE because of the flexibility of it’s templating system.  I’m pretty sure it’s what EE’s reputation is built on.

    Out of curiosity, what CMS’s are you referencing?  If there is an easier one to style/theme/template, I’d love to check it out.

  • #13 / Dec 04, 2008 3:28pm

    PXLated

    1800 posts

    what CMS’s are you referencing?

    I’d second that request.

  • #14 / Dec 04, 2008 3:48pm

    Crssp-ee

    572 posts

    Something else, not sure was mentioned, is templates can be stored in the system/templates folder as .tpl files. These can then be selected as the site default templates, even after installing EE the first time.
    Selecting the template group homepage.
    Chris P. has a few here: http://www.throughbrokenglass.com/ and some instructions.
    His templates are in various states of working order, but it’s a great experiment at hacking around with template groups. There are some threads in the forum with Q n’ A on those templates, most of the Q’s from yours truly. 😊

  • #15 / Dec 04, 2008 3:51pm

    fireproofsocks

    51 posts

    The more I think about it, what I really have a hard time with in EE is how templates have content.  In all the CMS’s I’ve worked with, content has a template(s).  That’s where my “backwards” opinion comes from.  You can’t open up a weblog post and choose for it to be formatted using template alpha or beta, for example.  I realize that a template displays content in both scenarios, but in EE, you alter your templates to determine which content is displayed, whereas in other CMS’s, you go to your content and choose how it will be viewed.

    The open-source CMS that I think has the best implementation of this content/template model is MODx.  It’s still in beta, so it’s missing some features that limit its potential user-base and preclude it from “mission-critical” use. It’s not necessarily the best-suited for a blogging site, either, but MODx just flat out makes sense to me (in a way that Drupal, Joomla, or Wordpress never did).  My dev shop is using it on some pretty big sites and it’s holding up nicely.

    Other than that, the CMS’s that we’ve developed in my company have never used a “templates have content” approach.  In fact, all the developers in my group that are looking at EE are perplexed by this architecture.  Just in my immediate group, our developers have written 3 CMS’s for different projects, and not one of them uses EE’s “templates have content” type of approach.  That doesn’t mean it’s wrong… I’m not arguing with the fact that EE is incredibly flexible, full-featured, well-documented, and robust.  But its approach is different enough for some of us to raise an eyebrow and scratch our heads.  It’s probably just how we think about things.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases