I’m finding that exp:char_limit isn’t evaluating when within a checkbox field loop.
In the following code, h_displayoptions is the name of a checkbox field, where “Top Headline” is one of the options:
{exp:channel:entries channel="News" orderby="date" show_future_entries="no" limit="10" dynamic="no" show="1|13|12|9|4|24" }
{h_displayoptions}
{if item=="Top Headline"}
<a href="http://{title_permalink=/newsevents/news_detail}">{title}</a>
{entry_date format="%l, %F %d, %Y, %g:%i %A"}
{exp:char_limit total="100"}
{h_details}
{/exp:char_limit}
<a href="http://{title_permalink=/newsevents/news_detail}">full story</a>
{/if}
{/h_displayoptions}
{/exp:channel:entries}The above works fine, except that the output contains the {exp:char_limit total="100"} code, followed by the full (multi-paragraph) h_details, followed by {/exp:char_limit}.
If I remove the checkbox field loop (and fake the if/then to function):
{exp:channel:entries channel="News" orderby="date" show_future_entries="no" limit="10" dynamic="no" show="1|13|12|9|4|24" }
{if item!="Top Headline"}
<a href="http://{title_permalink=/newsevents/news_detail}">{title}</a>
{entry_date format="%l, %F %d, %Y, %g:%i %A"}
{exp:char_limit total="100"}
{h_details}
{/exp:char_limit}
<a href="http://{title_permalink=/newsevents/news_detail}">full story</a>
{/if}
{/exp:channel:entries}The char_limit works as expected, trimming h_details to 100 characters. Of course I’m then ignoring the checkbox, which I don’t want to do.
Any suggestions? Thanks!