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.

Categories + Title Summary = Problem

May 21, 2008 6:51pm

Subscribe [3]
  • #16 / May 25, 2008 4:26pm

    Lisa Wess

    20502 posts

    Ah, ok.  I think I just had a moment of clarity here.

    The Category List links to category pages.  What I mean by this is that each link is intended to take you to a page that will show you all entries in that category.

    Whereas the related category mode is intended for use on a “single-entry page” wherein it is for display of a single entry (as opposed to multiple entries within that category).  The category list tag will not take you to a single entry page.

    Essentially, you’re getting results we’d expect from ExpressionEngine, but not the results that you need.

    Make sense so far?

    So, we need to figure out what you need in ExpressionEngine terms.  Right now, from what I understand, you want to show a single entry (noted by the URL title in the third segment).  Under that single entry, you want to show a list of other entries that share a category from the primary single entry.  Correct?

    {exp:weblog:entries weblog="expect" orderby="date" sort="asc" limit="1" show_future_entries="yes"}
    {title}
    {body}
    
    
    {/exp:weblog:entries}
    
    {exp:weblog:entries related_categories_mode="on" orderby="date" sort="asc" weblog="expect"} 
    <a href="http://{title_permalink=site/expect}">{title}</a>
    {/exp:weblog:entries}


    What you’ve got here will do that if the URL title is in segment 3:

    ie: http://pamfanjoy.com/index.php/site/expect/pam_fanjoy_as_child_specialist/

    But, I think where we are all getting hung up on is how you wish to navigate to that page.  Can you tell me how you want the navigation to appear?  I think we need to step back and know what your output goal is before we confuse ourselves even more.

  • #17 / May 25, 2008 5:19pm

    mountain monkey

    23 posts

    Ideally, I would like my navbar to link to index.php/site/expect. This page would display a single entry (a sticky that would change from time to time), followed by a list of linked Titles for other entries in that same category. I would like the content for those Titles to display in place of the single entry (sticky). Here is a link to a test page that works perfectly;

    http://pamfanjoy.com/index.php/site/expect/pam_fanjoy_as_child_specialist/

    The reason I included the segment3/URL in the link above is because if I don’t, the list of Titles don’t appear below the single entry.

    In regards to the category links in the sidebar, I would like them to link to the index.php/site/expect page, and display the appropriate single entry and linked Titles for that specific category.

    Does that help???

  • #18 / May 25, 2008 6:19pm

    Lisa Wess

    20502 posts

    It makes sense, but hrm.  The category links are going to link to a category page; there’s no way around that.  What you actually want is to link to a single entry page.

    How many of these links are there?  There is another tag - the category archive tag, that links to single entries and shows them as part of their category.  That might be one way to work this.

  • #19 / May 25, 2008 7:08pm

    mountain monkey

    23 posts

    At the moment there are 3 links to the page, one from the navbar, one from the category links in the sidebar, and one from the main page.

    I created another test page and implemented the category archive tag as you suggested above…it ALMOST works the way I need it to, except it displays a summary of linked Titles for both categories.

    Is there a way to have it only display the Titles that are related to the category being displayed???

    Here’s a link to the new test page;
    http://pamfanjoy.com/index.php/site/testexpect

    Thanks for your patience Lisa!

  • #20 / May 25, 2008 10:30pm

    Lisa Wess

    20502 posts

    Now we’re getting somewhere.  Do you simply need a list of titles form one category? If so, add a new weblog entries tag with dynamic off and category= your category ID.  You can get as many titles as you need that way and you’ll set it to link to the single-entry page.

  • #21 / May 26, 2008 12:50am

    mountain monkey

    23 posts

    I’ve added the dynamic off and category= tags that you suggested like this;

    {exp:weblog:entries weblog="expect" orderby="date" sort="asc" limit="1" show_future_entries="yes"}
    {title}
    {body}

    {/exp:weblog:entries}

    {exp:weblog:entries weblog="expect" orderby="date" sort="asc" category="C31" dynamic="off"}
    {title}
    {/exp:weblog:entries}

    {exp:weblog:categories weblog="expect" parent_only="yes"}
    {category_name}
    {/exp:weblog:categories}

    The results of the above code is that none of the Titles are displayed below the single entry. Here’s a link to the test page; http://pamfanjoy.com/index.php/site/expect/C31/

    If I take out the category= tag, then ALL the Titles are displayed. If category C31 = Topic A, and Topic A has 8 entries assigned that that category, shouldn’t ONLY those 8 entries be displayed when the link above is called???

  • #22 / May 26, 2008 2:06am

    Lisa Wess

    20502 posts

    Ok, I wasn’t being that clear.  Instead of the weblog categories tag, you’d use a weblog entries tag with the category= parameter.  That takes *just* an ID, no C in it, so:

    {exp:weblog:entries weblog="expect" orderby="date" sort="asc" category="31" dynamic="off"} 
    <a href="http://{title_permalink=site/expect}">{title}</a> 
    {/exp:weblog:entries}

    you still need your two weblog entries tags - one for the full single entry, and the other one with related category mode.  That combination should get you going.

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

ExpressionEngine News!

#eecms, #events, #releases