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.

Newbie site structure using channels and categories

February 04, 2012 8:52am

Subscribe [4]
  • #16 / Feb 07, 2012 9:29am

    Or would you like the index template in know_how to display entries from the channel? If so, then you need to use the channel:entries tag there and use url_title={segment_2}

    {exp:channel:entries channel=“know_how” url_title={segment_2}}


    You can then use an {if} to display the list of articles if there’s no segment2, else display the chosen article.

  • #17 / Feb 07, 2012 9:32am

    Thanks, that was exactly it… I wasn’t using a template therefore the index was being used. Don’t worry I’m learning more and more each day!

    thanks guys

    Yes, it does take some time getting used to the way EE handles things, it did for me.

  • #18 / Feb 07, 2012 9:33am

    Boyink!

    5011 posts

    I’d hold off on trying to have the index template serve both single and multi-entry views.  It’s do-able, but not something I’d suggest to an EE newbie..😊  It’s more complex when you start looking at pagination, categories, etc that all need to be handled - really takes an add-on or two to work well.

  • #19 / Feb 07, 2012 9:36am

    thebluecube

    11 posts

    Ha Ha, thanks guys. I was just about to post on here that I would love to be able to use the index template to serve both pages, but as a beginner I think I’ll use the two templates 😉

  • #20 / Feb 07, 2012 9:54am

    thebluecube

    11 posts

    OK I’ve got another one for you….

    Here is the index template:
    http://tgls.thebluecube.com/know-how/

    Here is the article template:
    http://tgls.thebluecube.com/know-how/article/article-number-one

    The title and paragraph in the left column are added to the index with:

    <h1>
      {exp:channel:entries channel="website_pages"}
        {page_title}
      {/exp:channel:entries}
      </h1>
     

      {exp:channel:entries channel="website_pages"}
          {website_content}
      {/exp:channel:entries}


    How do I get it to show in the article template???!!!

  • #21 / Feb 07, 2012 9:55am

    Yes, it’s a little tricky if you need to use pagination, etc. Personally I avoid pagination of articles, if possible, since most people prefer everything on one page even if it is a long one.  😊

  • #22 / Feb 07, 2012 9:57am

    thebluecube

    11 posts

    How can I get that text from the website_pages channel into the article template?

  • #23 / Feb 07, 2012 10:08am

    thebluecube

    11 posts

    Fixed it 😊

  • #24 / Feb 07, 2012 10:39am

    <h1>
      {exp:channel:entries channel="website_pages"}
        {page_title}
      {/exp:channel:entries}
      </h1>
     

      {exp:channel:entries channel="website_pages"}
          {website_content}
      {/exp:channel:entries}


    It would be better to do this:

    {exp:channel:entries channel="website_pages"}
    
      <h1>{page_title}</h1>
        
      {website_content}
    
    {/exp:channel:entries}
  • #25 / Feb 07, 2012 8:03pm

    John St-Amand

    865 posts

    To give you a particularly complete understanding of the relationships between entries and templates, I would recommend having a relaxed walk-through Mike Boyink’s site, train-ee.com.  His free tutorials are an outstanding orientation to EE.

  • #26 / Feb 08, 2012 1:20pm

    Boyink!

    5011 posts

    Thanks John - appreciated.

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

ExpressionEngine News!

#eecms, #events, #releases