0

I'm trying to pass a category id to an embed like so:

{if local_ratings=="Los Angeles"}    
{embed="embeds/ratings" cat="22"}
{/if}

The "local_ratings" is an EE dropdown.

In my embed I have:

{exp:channel:entries channel="reports" disable="member_data|trackbacks"  limit="200" category="cat" dynamic="no"}     
... stuff ...
      {if absolute_count == total_results}{if:else},{/if}
{/exp:channel:entries}

I cannot get anything to output from the embed. If I manually add an ID to the embed it works.

1

I believe you have to use proper tags to access embed vars, ie:

{exp:channel:entries channel="reports" disable="member_data|trackbacks" limit="200" category="{embed:cat}" dynamic="no"} ... stuff ... {if absolute_count == total_results}{if:else},{/if} {/exp:channel:entries}

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.