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.

question from newbie: create multiple entry page that lists blog posts from a category

August 03, 2010 2:31pm

Subscribe [3]
  • #1 / Aug 03, 2010 2:31pm

    marianway

    24 posts

    I have created a weblog with several entries and categories. I have created a multiple-entry template which displays the most recent 10 posts and a side bar which displays the category names, which have the correct URLs attached to them. I have also created the ‘single entry’ template so when I click on one of the entries I get a single post. All of this is working ok.

    What I would now like to achieve is to be able to create a page which has the most recent x number of posts in whatever category is clicked upon in the side bar. I understand that I can use the same multiple-entry template but cannot work out what expression engine code is needed to perform this miracle!

  • #2 / Aug 03, 2010 8:20pm

    Brandon Jones

    5500 posts

    Hi marianway,

    There are a few approaches, but if you append /category/xxx (where xxx is a category ID or category title, depending on if you have category URL titles enabled) to your multi-entry template URL, EE will limit the results to 10 from just that category.

    If the category links from your sidebar are correct, this might already be the case.

  • #3 / Aug 04, 2010 12:53am

    marianway

    24 posts

    Thanks Brandon. I am afraid I am still not 100% clear…

    Whereabouts within existing code do I append /category/xxx ?

    I can get it to work when I create a separate template and type in a specific category ID but don’t know what to type instead of xxx when I want it to be dynamic and choose the correct category based on what has been clicked in the sidebar.

    The link you have provided re enabling category URL titles refers to Expression Engine 2. How does this work in v 1.6.9?

  • #4 / Aug 04, 2010 1:01am

    marianway

    24 posts

    Hi Brandon - no need to answer previous post. The clue was actually in the last sentence of your reply. My category links were incorrect. Have now put them right and it works! Thank you!

  • #5 / Aug 04, 2010 1:31pm

    Sue Crocker

    26054 posts

    Glad Brandon was able to help. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases