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.

Beginner templating question

November 06, 2011 8:17am

Subscribe [2]
  • #1 / Nov 06, 2011 8:17am

    neoginb

    5 posts

    Hello guys,

    I’m a beginner with EE so my question may seems a little trivial but I wasn’t able to find help in the user guide or a tutorial for it.

    It’s a general question about the templating system :

    let’s say I create a “team” page, meaning a page which contains the list of the team member, and for each of the member I want a personal page. This page is not the index page.

    So I have the CSS and HTLM for both the “team” page and the “team member profile” page. I also created a channel called “team members” which contains informations about each team member as entries.

    So here my questions :

    - How do I define different templates for specific entries (“team member profile” page) the and for the “container” of the entries ( the “team” page)
    - How do I sort them using a specific field of the entries, for example sort them by “field” ( i.e. creative, management etc…) ?


    Once again it may seems trivial, or maybe it is already explained somewhere else but I wasn’t able to find it. So may I ask you to help me or to point me in the right direction ?

    Thank you all,
    Gautier

  • #2 / Nov 07, 2011 8:57am

    Sue Crocker

    26054 posts

    Hi, Gautier.

    When I do this sort of thing, I create a channel for the team members. Then I have a template group called team, and a single entry template called info (You can call it whatever you like, I just chose that name.)

    So I build a link on the team page (team/index template) to team/info/{url_title} for each of the team members.

    So Sally Smith’s page would be:

    http://example.com/index.php/team/info/sally-smith

    Inside of the team/info template you have the exp:channel:entries loop with a limit=“1” - and EE “sees” what entry to show based on the third segment, which is the url_title.

    As far as sorting by a custom field - see this page in the EEDpcs

    Does that help?

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

ExpressionEngine News!

#eecms, #events, #releases