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.

Problem using current cateogory id in weblog tag

May 21, 2008 12:31pm

Subscribe [1]
  • #1 / May 21, 2008 12:31pm

    RFMedia

    10 posts

    Hello i have a problem with weblog tag
    I want to output featured block on top of category page

    {exp:weblog:entries  weblog="{my_weblog}" category="{category_id}&7;"  limit="1" orderby="date" sort="desc" dynamic="off"  disable="pagination|member_data|trackbacks"}

    Where {category_id} current category id and 7 is featured category. Unfortunately this is not works.

    I can output {category_id} with out any problem and this tag works with out any problem when i replace by id of category

    Will appreciate any advice

  • #2 / May 21, 2008 12:38pm

    Robin Sowell

    13255 posts

    {category_id} isn’t going to be parsed- unless you’re nesting that tag inside something else.  Which I generally don’t recommend, though a category_heading tag would likely be ok.  So- either try it nested in a category_heading tag- or you’ll likely need some php in order get the current cat id from the url.  Oh- and you’ll likely need the dynamic=“off” paramter as well.

    Does that make sense?

  • #3 / May 22, 2008 9:22am

    RFMedia

    10 posts

    Thanks Robin,

    Putting it into category heading tag helped us. We have just small bug with category name for inner post that no the same. But this isn’t important for us.

    Thanks for your help.

  • #4 / May 22, 2008 9:34am

    Ingmar

    29245 posts

    So, are we ready to close that one out?

  • #5 / May 22, 2008 9:49am

    RFMedia

    10 posts

    yes thanks

  • #6 / May 22, 2008 9:52am

    Ingmar

    29245 posts

    There we go.

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

ExpressionEngine News!

#eecms, #events, #releases