Primary Tag¶
Returns the full contents of your Wygwam field.
{exp:channel:entries channel="blog"}
<h1>{title}</h1>
{my_wygwam_field}
{/exp:channel:entries}
The following tags are available for your Wygwam fields within {exp:channel:entries} tag pairs.
Returns the full contents of your Wygwam field.
{exp:channel:entries channel="blog"}
<h1>{title}</h1>
{my_wygwam_field}
{/exp:channel:entries}
The following tags deal with Wygwam fields which use the new “Read More” separators.
If your field has a “Read More” separator, this returns your Wygwam field contents up until that point. Otherwise it will return the full contents of your Wygwam field.
For use in conditionals. Returns “y” if your Wygwam field has a “Read More” separator within it.
{my_wygwam_field:excerpt}
{if {my_wygwam_field:has_excerpt}}
<a href="{path='blog/full-posts/{url_title}'}">Read more...</a>
{/if}
If your field has a “Read More” separator, this returns the remaining portion of your Wygwam field contents after that point. Otherwise it won’t return anything.
<h1>{title}</h1>
{my_wygwam_field:excerpt}
<div class="extended">
{my_wygwam_field:extended}
</div>
If you pass the parameter text_only="yes" to Wygwam’s primary, :excerpt, or :extended tags, Wygwam will remove all the HTML tags from the content, leaving only the text.
{my_wygwam_field text_only="yes"}
If you just want to remove the images, but leave the rest of the HTML markup in place, you can pass remove_images="yes" instead.
{my_wygwam_field remove_images="yes"}
If you pass the parameter images_only="yes" to Wygwam’s primary, :excerpt, or :extended tags, Wygwam will remove everything but the images from the content, and separate them with line breaks.
{my_wygwam_field images_only="yes"}
If you want to have complete control over the HTML output, use a tag pair:
<ul>
{my_wygwam_field images_only="yes"}
<li><img src="{src}" width="{width}" height="{height}" alt="{alt}" /></li>
{/wygwam_field}
</ul>
The following parameters are available to help customize the images-only output:
The following variable tags are available within the tag pair: