I am not sure if I have been staring at the screen too long today or what but I am having a major lapse in brain power. Here's the deal:
- I have a list of images that I relate to specific entries
- I use a reverse_related_entries tag to display the images on the related entry
- If an image does not have an entry associated with it I want to randomly pull an image from the images channel and display it on the entry view.
Here is the interesting issue. The {stash:embed} (that is commented out below) gets rendered in the "no_reverse_related_entries" tag (when uncommented) but the normal EE {embed} does not render if there aren't any reverse related entries.
{exp:channel:entries
channel="ch_pages"
status="open"
limit="1"
{global:param_disable_default}
}
{reverse_related_entries
channel="ch_page_header_images"
status="open"
limit="1"}
{if no_reverse_related_entries}
{embed="test/random_header_image"}
{!-- {stash:embed:includes:em_random_header_image} --}
{/if}
<img src="{cf_header_image:medium}" alt="{title}" width="390" id="Header-Image" role="img" />
{/reverse_related_entries}
{/exp:channel:entries}
Stash embeds, unless tweaked with the "parse_stage" parameter (and with the defaults in place), seem to be parsed like regular embeds in other area of the site (and per the Stash docs). Where am I going wrong here?