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.

Pages Module question

August 19, 2010 3:52pm

Subscribe [3]
  • #1 / Aug 19, 2010 3:52pm

    buridan

    61 posts

    I want to create a page that functions similar to the categories page, i.e., entries of a particular type are shown together on a separate page, but with a single dedicated page with it’s own unique template. For example, I will have a regular weekly column (entry) that will be posted on my main page every Friday but I want a distinct page that collects all those weekly column entries.

    Simply creating a new category doesn’t work because that page/template is not unique to the weekly column. Creating a page from the Pages Module works but then each consecutive entry has it’s own unique page - not collected together on the same page. I’ve been through the users guide about this but cannot figure out how to accomplish what I want with either Tags or Templates, etc. I’ve already created a unique template for this page.

    Does any of this make sense?

  • #2 / Aug 20, 2010 6:03am

    tidy

    196 posts

    Hi Buridan,

    I’m not quite sure what you mean…

    If you have created a unique template for this page then by putting a weblog/channel entries loop in it, you can show your list of entries and have whatever other content you like in the template.

    If you want the other content to be editable as a weblog/channel entry, I usually do this by having a ‘pages’ weblog where I create an entry for the page introduction etc and then I add another weblog/channel entries loop to my template to display the relevant entry id.

    So the template contains:

    Header html
    loop to get out entry_id x from pages weblog to show page intro
    loop to get out weekly column entries
    footer html

    Does this help, or are you looking to do something else?

  • #3 / Aug 20, 2010 10:20pm

    buridan

    61 posts

    Hi tidy,

    Thank you for helping me out. Is the following what you mean by channel entries loop?

    <div class="blog">{exp:channel:category_heading channel="{my_channel}"}
          {if category_description}
          {category_description}
          {/if}
          {/exp:channel:category_heading}
          {exp:channel:entries channel="{my_channel}" orderby="date" sort="desc" limit="5" disable="member_data|trackbacks"}
          <div class="bodyText">
            <div class="pageName">{title}</div>
            <div class="posted">{entry_date format=' %l, %F %d, %Y '}</div>
            {summary}
            {body}
            {extended}
          </div>
          {paginate}
          <div class="paginate"> <span class="pagecount">Page {current_page} of {total_pages} pages</span> {pagination_links} </div>
          {/paginate}
          {/exp:channel:entries} </div>
      </div>

    I’m sorry for not knowing the lingo.

  • #4 / Aug 22, 2010 5:07am

    Ingmar

    29245 posts

    Simply creating a new category doesn’t work because that page/template is not unique to the weekly column.

    You could certainly check for the {category_id} with a conditional and style it accordingly. Or, just create a new template and hardcode the category_id in the exp:channels:entries tag:

    {exp:channel:entries channel="foo" category="99" dynamic="no"}

    I definitely think categories would be the way to go. If you are using them for something else give Tags another look.

  • #5 / Aug 23, 2010 5:48am

    tidy

    196 posts

    Hi Buridan,

    Yes I was referring to the {exp:channel:entries} tag alright but having reread your original post again I would agree with Ingmar that categories will handle this for you best here.

    So you can give all your weekly columns a category of say weekly and then use {if category_id==x} wherever you need to customise your template or use a different template and hard code as Ingmar explains.

    You could also use custom category fields if needed to store extra info unique to each category.

  • #6 / Aug 24, 2010 5:07pm

    buridan

    61 posts

    Thanks again for taking the time to help me out! 😊 I’m not understanding where the conditional and/or hard-coded tags should be placed. I’ve tried a bunch of variations - placing them in the newly created template for the “weekly column” and in the main index template - but I’m not getting the results that I would expect. Here’s a link to my site that provides an example of where I’m coming from (if you’re still willing to stick with me).

    http://justplaygo.com/index.php/P5

    About halfway down the page there’s an entry entitled, “August Vendor Spotlight”. it’s assigned the category “Vendor”. Clicking on the Vendor category link obviously brings you to that particular category page - http://justplaygo.com/index.php/category/vendor. However, the page uses the index template as does every particular category page. What I would like to do is have a unique template just for this category, e.g., http://justplaygo.com/index.php/vendor. This way I can tailor the template to fit the category rather than rely on the generic (index) template that is currently used for all the categories.

    In fact it would be very nice to have unique templates for each category. So instead of seeing entries for a specific category within the index template, each category would be assigned a unique template and URL. Does this make sense?

  • #7 / Aug 24, 2010 6:07pm

    Ingmar

    29245 posts

    What I would like to do is have a unique template just for this category, e.g., http://justplaygo.com/index.php/vendor.

    So create a custom template, style it any way you want, then add

    {exp:channel:entries channel="foo" category="99" dynamic="no"}

    Be sure to replace 99 with the correct category_id.

  • #8 / Aug 24, 2010 9:29pm

    buridan

    61 posts

    Okay, I’m a complete idiot. Instead of putting in the category id #, I was putting in the category name… :red:

    It works like a charm now. Thank you, thank you, thank you.

  • #9 / Aug 25, 2010 3:25am

    Ingmar

    29245 posts

    Woot! Glad that has helped 😊

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

ExpressionEngine News!

#eecms, #events, #releases