Skip to content

Instantly share code, notes, and snippets.

@jeromecoupe
Last active December 19, 2015 09:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeromecoupe/5934239 to your computer and use it in GitHub Desktop.
Save jeromecoupe/5934239 to your computer and use it in GitHub Desktop.
Block </li></li> together with ExpressionEngine when using inline-block (avoid whitespace bug)
{!-- List last 3 news (blocking the <li></li> together is mandatory due to using inline-block) --}
{exp:channel:entries channel="news" disable="categories|category_fields|member_data|pagination|trackbacks" status="open" orderby="date" sort="desc" dynamic="no" limit="3"}
{if count == 1}<ul><li>{/if}
<article>
<h3><a href="{url_title_path='news-press/index'}">{title}</a></h3>
<p>{exp:eehive_hacksaw words="30" append="&hellip;"}{cf_news_summary}{/exp:eehive_hacksaw}</p>
</article>
{if count == total_results}</li></ul>{if:else}</li><li>{/if}
{!-- if not results --}
{if no_results}<p>No news found</p>{/if}
{/exp:channel:entries}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment