All I want to do is to take the values in an EE tag and reuse it in another EE tag.
E.g. Below is a breadcrumb, and I want to grab the parent category ID (here I’ve stored it in a PHP variable “$parent_cat_id”)...
{exp:gwcode_categories entry_id="{entry_id}" style="linear" limit="3"}
<a href="http://{path=">{cat_name}</a> <?php $parent_cat_id = {cat_id}; ?> »
{/exp:gwcode_categories}... so that it can be used in another EE tag (in the code, you can see the php tag inside the parameter “cat_id”)...
{exp:gwcode_categories cat_id="<?=$parent_cat_id?>" style="linear" class="tabs" last_only="yes"}
<li{if segment_2 == url_title} class="active"{/if} {if count == 1}id="first-tab"{/if}>
<a href="http://{cat_url_title}">{cat_name}</a>
</li>
{/exp:gwcode_categories}In the above code, the PHP variable “parent_cat_id” can be echoed outside of the EE tags, but not inside… I have not found an equivalent to the PHP variable. I have tried nesting the first EE tag inside the second, tried using the {preload_variable}, tried putting an EE query inside the gwcode_categories tag.
Any other thoughts or suggestions? I greatly appreciate it. Thanks!
Note: I am running Expression Engine 2.2.0.