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.

How to set a variable from one weblog entry session and use it in another weblog entry session?

January 14, 2008 9:52pm

Subscribe [3]
  • #1 / Jan 14, 2008 9:52pm

    Dryad

    1 posts

    ———I would like to display a list of related items on a product detail page.

    So far I’m getting too broad a list.

    The recent post recommending the dynamic=“off” parameter was helpful but not definitive.

    In the code below I think I’d like to have a variable instead of the “prod_sku=“101”

    start related code

    {exp:weblog:entries weblog="products" search:prod_sku="101" dynamic="off" offset="1"}
    {title}<br>

    {exp:weblog:categories}
    {category_name}
    {/exp:weblog:categories}

    {/exp:weblog:entries}

    ————- This segment of code below seems to actually render the list I want but hard coding the category is not efficient. Category 22 defines the product relationships.

    {exp:weblog:entries weblog="products" orderby="prod_sku" sort="asc" category="22" dynamic="off"}
    {title}<br>
    {/exp:weblog:entries}

    I’d be grateful for suggestions!
    cf

  • #2 / Jan 14, 2008 10:05pm

    tbritton

    714 posts

    Please check on this technique spacewalk developed. Also, read this post to see if it makes sense to you. It uses embed templates and passes variables to them from the calling weblog.

    Also, see if the free extension/module Fresh Variables would be helpful to you.
    Terry

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

ExpressionEngine News!

#eecms, #events, #releases