Single Template for Live & Preview Templates
Author: Russ K. | ExpressionEngine, Web Design & Development,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 2606 times.
Comments
Commenting is not available in this channel entry.Let's talk about your next project.
Do you have an idea, a project, or a creative challenge you're ready to move forward with? Reach out and tell me a little about what you need, I'd be happy to talk through the details and see how Kern Creative Design can help.