Russ K. | 05/03/2021 | Web Development |

Single Template for Live & Preview Templates

There is a convenient way in ExpressionEngine to be able to utilize your live page template as your "preview" template too.  It is all made possible by this handy little tag: 

{if is_live_preview_request}

To implement it, just include it in the "status" attribute as shown below.

{exp:channel:entries channel="whatever" status="open{if is_live_preview_request}|closed{/if}"}

Thats all there is to it. Say goodbye to “out of sync” live & preview templates.

This entry has been viewed 1084 times.

Comments

Commenting is not available in this channel entry.

Subscribe to my mailing list