I have created a custom module which works fine except for the following:
I cannot seem to get embeds working within the tags eg the following does not work:
{exp:cg_industry_data:vddu erec_id="{segment_3}"}
{embed="search/vehicle-details-dealer-used"}
{/exp:cg_industry_data:vddu}
I have also had trouble applying a conditional to variables which are defined within the tags, eg:
{exp:cg_industry_data:vddu erec_id="{segment_3}"}
{if {my_custom_variable} == "boo"}
<div> hello world </div>
{/if}
{/exp:cg_industry_data:vddu}
If someone could point me to some documentation which explains how to make this work I would be very greatful. I have read the material here but it does not seem to cover this topic.
thanks!
Update: I have managed to get the conditional working by using quotes, eg.
"{seller_type}"
but I still cannot get the embed to work when inside the module tags.
{exp:cg_industry_data:vddu erec_id="{segment_3}"}
{if "{seller_type}" == "Dealer Used" }
{embed="search/vehicle-details-dealer-used"}
{/if}
{/exp:cg_industry_data:vddu}
The embed fails. Not sure why. When run outside of the tags it is fine.
You could try using ‘parse=”inward”’ on your module tag to reverse the parsing order. eg:
{exp:cg_industry_data:vddu erec_id="{segment_3}" parse="inward"}
{if "{seller_type}" == "Dealer Used" }
{embed="search/vehicle-details-dealer-used"}
{/if}
{/exp:cg_industry_data:vddu}
Not 100% about that but give it a go.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.