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.

Random Entry Display

September 04, 2008 4:54pm

Subscribe [2]
  • #1 / Sep 04, 2008 4:54pm

    keola

    8 posts

    Hi,

    I’ve poked around a bit in the forums and documentation but can’t find an answer to this problem I’m running into.

    I have a site with a series of customer testimonials that are put in as entries within a certain category. The idea was to have them displayed randomly every time a particular page was hit.

    I’ve managed to get them to display randomly on most pages but they won’t come up on any blog page that has comments enabled. I’m not sure if the 2 are related but the {embed="blog/rt_channel" pg="blog"} tag is the same on all pages. So it is pulling in the same template.

    The other weird thing is that the comment enabled paged will display other items in the aforementioned rt_channel template, just not the random quote.

    This is the entry tag for the random quote:

    {exp:weblog:entries weblog="rt_chan" disable="member_data|pagination|trackbacks" orderby="random" category="4" limit="1" }
      {main_entry}
    {/exp:weblog:entries}

    Like I said, this very code is working on other pages just not the ones with comments.

    Any help would be greatly appreciated as I’m stumped.

    -shane

  • #2 / Sep 04, 2008 5:06pm

    Ingmar

    29245 posts

    Without taking a closer look, have you tried adding dynamic=“off” to your exp:weblog:entries tag?

  • #3 / Sep 04, 2008 5:08pm

    keola

    8 posts

    I actually just did and was coming back to report success.

    Thank you though.

    -shane

  • #4 / Sep 04, 2008 5:11pm

    Ingmar

    29245 posts

    Very good 😊 Thanks for letting us know. Closing this one out.

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

ExpressionEngine News!

#eecms, #events, #releases