Support Forum
Articles Anywhere
Articles Anywhere removes closing div after unpublished item
I have the following piece of code in a Joomla article.
<div class="block-features">
<div class="container">
<div class="row">
{article features-intro}
<div class="col-xs-12">
<hr/>
<h2>{title}</h2>
</div>
{/article}
</div>
<div class="row block-special-features">
<div class="col-md-6">
{articles cat:ordering:features-items}
<h3>{title}</h3>
{text}
{/articles}
</div>
<div class="col-md-6">
{article features-unique-feature}
<img src="{image_intro}" class="img-responsive" alt="{image_intro_alt}"/>
{text}
{/article}
{article features-official-partner}
<img src="{image_intro}" class="img-responsive" alt="{image_intro_alt}"/>
{text}
{/article}
</div>
</div>
</div>
</div>
When article with alias = features-official-partner is not published a closing div is removed.
Instead of four closing divs I notice three closing divs.
This behaviour ruins the site.
Can you reproduce and solve this issue?
Try placing the {article} tags inside <p> tags:
<div class="block-features">
<div class="container">
<div class="row">
<p>{article features-intro}</p>
<div class="col-xs-12">
<hr/>
<h2>{title}</h2>
</div>
<p>{/article}</p>
</div>
<div class="row block-special-features">
<div class="col-md-6">
<p>{articles category="features-items"}</p>
<h3>{title}</h3>
{text}
<p>{/articles}</p>
</div>
<div class="col-md-6">
<p>{article features-unique-feature}</p>
<img src="{image_intro}" class="img-responsive" alt="{image_intro_alt}"/>
{text}
<p>{/article}</p>
<p>{article features-official-partner}</p>
<img src="{image_intro}" class="img-responsive" alt="{image_intro_alt}"/>
{text}
<p>{/article}</p>
</div>
</div>
</div>
</div>