Skip to content
ExpressionEngine accessory that adds a preview link to the "preview" page.
PHP
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
third_party/simple_preview
README.textile

README.textile

Simple Preview

Instead of having to deal with “Live Look”, this EE 2.0 accessory simply adds a Preview link to the “preview” page you see after submitting an entry. This way, you can utilize your already built single entry view for previews without much fuss.

Installation

  1. Copy the simple_preview folder into your third_party directory.
  2. Go to Add-Ons > Accessories and install Simple Preview.
  3. Enter the url to your single entry template in the Channel URL field in Channel Preferences.
  4. Allow closed statuses on your single entry template.

Example

I have a blog channel that lives at /blog. The individual blog post URLs are /blog/{url_title}. In the preferences for the blog channel, I enter /blog/ into the Channel URL field. The URL for the preview link will be /blog/{url_title}/preview.

Then, I need to make sure to allow closed status entries for the individual view, so my blog template looks like this:

{if segment_2}
	{!--This is the individual blog entry--}
	
	{exp:channel:entries
		channel="blog"
		limit="1"
		status="open{if segment_3 == "preview"}|closed{/if}"
	}
	
	{/exp:channel:entries}
	
{if:else}
	{!--This is the blog listing page--}
{/if}
Something went wrong with that request. Please try again.