On our web-site each article (Single Entry Page) is accompanied by 4 related articles. Those 4 are chosen by the editors. I set up a native EE 2.6.1 Relationships Field for them. For the article itself I set up a Content Elements Field. In the related articles are below the main article I´d like to show
- the title of the related articles
- the articles first image (called intro_image)
- I also need the url_title_path, to make title + image clickable.
I have no problems with title + url, but can´t get the CE tag to work.
This is my code
{exp:channel:entries channel="article" status="open|featured"}
{related_article status="not closed"}
{artikel}
{gallery}
{if element_name=="intro_image"}
{images}
{related_article:image} <= doesn´t work!
{images}
{/if}
{/gallery}
{/artikel}
<p><a href="{related_article:url_title_path='artikel/index'}">
{related_article:title}</a></p>
{/related_article}
{/exp:channel:entries}
This code is working fine for the title and the URL, but not for the image. I tried to prefix {artikel}
, {gallery}
, {image}
in various combination with {related_article:}
. But this is not working. When I leave out the related_article in frot of each of the three tags, I get the intro image from the main article. So I need an identifier, that points to the child entry.