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.

Embed weblog depending on category

June 29, 2008 3:03pm

Subscribe [2]
  • #1 / Jun 29, 2008 3:03pm

    Brandon C.

    43 posts

    Here’s what I have added to one of my templates

    {exp:weblog:entries}
    
    {categories}
    
    {if category_name == "tickets"}
    
    {exp:weblog:entries weblog="callouts" url_title="tickets_callout" dynamic="off"}
    
    {content}
    
    {/exp:weblog:entries}
    
    {/if}
    
    {if category_name == "productions"}
    
    {exp:weblog:entries weblog="callouts" url_title="productions_callout" dynamic="off"}
    
    {content}
    
    {/exp:weblog:entries}
    
    {/if}
    
    {/categories}
    
    {/exp:weblog:entries}

    but all that spits out is:

    {categories} {/categories}

    I’m sure its some sort of freshman mistake - any idea what I’m doing wrong?

  • #2 / Jun 29, 2008 5:44pm

    Opaline

    71 posts

    blcarson, did you see this post?

    That shows how to display posts by category.

    You might be interested in the weblog category archive tag, too:

    http://expressionengine.com/docs/modules/weblog/category_archive.html

  • #3 / Jun 29, 2008 7:05pm

    Brandon C.

    43 posts

    That’s sort of what I’m trying to do, but I should probably clarify my question more…

    The page that I’m trying to add this content to resides in another weblog called “static”. Within static, there are several categories. I would like this content (an entry in the “callouts” weblog) to only show up in the static weblog under one of those categories.

    The code that I pasted above is what I put into the template that powers the static weblog pages.

    I tried messing with the links you posted but I don’t think that’s exactly what my situation entails (if it is, I apologize… I’m just not wrapping my head around it right).

    Thanks for the help so far!

  • #4 / Jun 29, 2008 10:03pm

    Opaline

    71 posts

    It sounds like you’re talking about relating entries between weblogs:
    http://expressionengine.com/docs/modules/weblog/related_entries.html

  • #5 / Jun 29, 2008 10:32pm

    Brandon C.

    43 posts

    Yep you’re right - that’s definitely the way to go. Not sure why that didn’t occur to me 😊 Thanks!

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

ExpressionEngine News!

#eecms, #events, #releases