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.

Selecting individual items in a category to display

September 15, 2008 6:08pm

Subscribe [2]
  • #1 / Sep 15, 2008 6:08pm

    tantau

    35 posts

    I have one long weblog that contains all of the information for one section of my website. I placed them all into the same weblog because they all have the same type of information. Several different templates pull from this weblog, and each template has its own side navigation.

    I have created several different categories to “contain” the weblog entries that go together. How do I create a URL that will call only one item in a category? Currently when I get all of the category’s items on a page. I want to be able to “cherry pick” the items on the page.

    Thanks,

    Neal

  • #2 / Sep 15, 2008 6:50pm

    GDmac - expocom

    350 posts

    There are several ways to achieve this. From what i read in your post you want to rate
    some of the entries more useful or important. You could make a new custom field in
    the weblog-fields called ‘my_rating’ (a dropdown-menu for instance) and then rate your entries.
    In the exp:entries tag you can sort and order_by rating (best on top) or even only
    show a specific rating. (order_by=“rating” and/or search:rating=“5”)
    http://expressionengine.com/docs/modules/weblog/parameters.html#par_orderby

  • #3 / Sep 15, 2008 8:33pm

    tantau

    35 posts

    Thanks, GDmac, but I’m trying to post one weblog entry in a template and it’s not working. I’m not trying to rate the entries. In fact, I’ve learned a little more since you wrote your answer, so I’ll focus my question.

    I’m trying to achieve one of the simpler things in EE. I have the following URL:

    <a href="http://localhost:8888/ee/procurement/index.php/make_a_purchase/test/">http://localhost:8888/ee/procurement/index.php/make_a_purchase/test/</a>

    This page lists all 30 entries in my weblog. That’s what I expected and, thankfully, that’s what happens.

    As I understand it, by adding a weblog entry_id to the URL (or by adding the entry URL), only the entry that I want should post to the page—not all 30 weblog entries. So when I add the entry id, here’s what the URL looks like:

    <a href="http://localhost:8888/ee/procurement/index.php/make_a_purchase/test/212/">http://localhost:8888/ee/procurement/index.php/make_a_purchase/test/212/</a>

    This URL still renders all 30 entries :-(

    Here is my template page code:

    {exp:weblog:entries weblog="goods_and_services" dynamic="off"}
    <h3>{title}</h3><p> <br />
    {text_area2}<br />
    {/exp:weblog:entries}

    Any new thoughts? Dang this is frustrating!

    Thanks!

  • #4 / Sep 16, 2008 6:54am

    GDmac - expocom

    350 posts

    the dynamic=“off” makes the weblog:entries tag ignore ANY url-segment so
    the weblog:entries loop will only look at its own parameters.

    Again, You have some options 😊
    You can let it lookup the url-segment or entry id:

    {exp:weblog:entries weblog="weblog1" dynamic="off" url_title="{segment_3}"}
    {exp:weblog:entries weblog="weblog1" dynamic="off" entry_id="{segment_3}"}

    http://expressionengine.com/docs/templates/globals/url_segments.html

    also take a look at disabling trackback, member info and pagination to speed up things a bit:
    http://expressionengine.com/docs/modules/weblog/parameters.html#par_disable

  • #5 / Sep 16, 2008 1:10pm

    tantau

    35 posts

    Solved. Thank you. I was just missing the segment attribute for the tag. And I’ll look at the URL you posted about trackbacks, too.

    Thanks!

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

ExpressionEngine News!

#eecms, #events, #releases