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.

How to assign templates? Also ties in with categories and channels

May 14, 2012 12:26pm

Subscribe [2]
  • #1 / May 14, 2012 12:26pm

    Matthew81

    81 posts

    Despite beginning to get a handle on some aspects of EE, I can tell I’m still at the beginning of what promises to be a very long, steep learning curve. Apologies in advance for the many threads I foresee myself starting in the near future. :(

    My question right now is, how are templates assigned?

    I would have *expected* to assign templates to categories, or perhaps (though hopefully not) to individual entries as they’re posted.

    But now, it appears the only way to assign templates to content is through - Channels??!

    This leaves Channels feeling an awful lot like Categories would feel on any other platform.

    In fact, if Channels hold all the information, and are what templates are assigned to, then what use are Categories anyway?

  • #2 / May 14, 2012 12:50pm

    Boyink!

    5011 posts

    I’d really suggest walking through one of the tutorial series on Train-ee or, if possible, buying the book.  Or buy the screencasts from Mijingo.com, or a intro class from Creat-ee.  These are all resources developed to get you over these learning curves.

    Templates aren’t assigned.  You create templates and then choose what channels to pull content from by how you code the template.  One template may pull content from a dozen channels.  Or one.  Or none.

    As I posted before, categories are simply a way to filter results from a channel.  Put another way, they are a way to retrieve a subset of entries that exist in a channel.

    Picture a small wall built with Lego bricks.  Layers of the wall are in different color bricks so the wall appears striped.  Categories are a way to tell EE “I only want the red layers”.

  • #3 / May 14, 2012 4:41pm

    Matthew81

    81 posts

    Thank you for the Train-ee suggestion. I hadn’t seen that site before.

    Unfortunately, the tutorials seem to be using an outdated version of EE, and the current versions no longer have the Weblog feature that is so heavily-used in the tutorial examples. (In fact, in at least one of your tutorials, it looked like every single front-end “page” of the site was implemented through this single, apparently-discontinued feature.)

    Is there a good source out there for more current information?

    Regarding the original questions, I looked under Channel Preferences and there’s a dropdown list to select the “Live Look Template” for the channel. I figured that was to assign the template for the channel. Apparently that’s meant for something else, so I’ll work that out later.

    However, if templates aren’t assigned, then how does EE know to load a particular template?

  • #4 / May 14, 2012 4:43pm

    Matthew81

    81 posts

    I should add that the pieces are beginning to make sense, but I’m still missing the “glue” that makes it all work together. Thanks very much for your help - I’m sure it will all start to gel soon.

  • #5 / May 14, 2012 4:43pm

    Boyink!

    5011 posts

    The code is 99% the same:
    http://www.train-ee.com/courseware/free-tutorials/comments/translating-ee-1-code-to-ee-2/

    Mostly the term “weblog” just changed to the term “channel” from a template coding perspective.  Features, functionality and implementation approach is the same.

    Or buy the book - it’s been updated to EE 2.4..😉

    All of the Channel Prefs where you map to templates are for link-building.  Sometimes you use them, sometimes you don’t.

    EE knows which templates (and categories, and entries) to load by the URL requested.

    http://ellislab.com/expressionengine/user-guide/general/urls.html

  • #6 / May 14, 2012 5:04pm

    Matthew81

    81 posts

    The URL stuff might be the piece I’ve been missing. I wish some of the content you linkedto in the documentation had been at least alluded to in the “Templates” section, it could have saved me a lot of time.

    I need to ruminate on this a bit and see how things start to come together.  But I’m finally starting to have my first glimpses of clarity.

    I’d love to buy the book - actually wanted to all weekend but didn’t have authorization to spend the money. I believe I’ll go see if I can get an extra $40 allocated to this project so I can do so. 😉

    Does the book address everything from beginner to advanced concepts? I know it may not seem like it from my posts here so far, but I really am an experienced web developer and will advance quickly once I get the hang of how EE does things.  I’ve actually made other platforms do things the developers never dreamed they could do, so I’m thinking I’ll want some advanced EE knowledge as well before too long.

  • #7 / May 14, 2012 5:28pm

    Boyink!

    5011 posts

    The description of the book is here:
    http://www.train-ee.com/courseware/books/detail/building-an-expressionengine-2-site-small-business/

    You’d have to define what “advanced” is - it doesn’t go into, for example, building your own custom add-ons.

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

ExpressionEngine News!

#eecms, #events, #releases