Skip to content

ExpressionEngine 2 accessory that allows you to preview newly published content from the control panel immediately after publishing (even if entry is closed).

License

Notifications You must be signed in to change notification settings

ckimrie/acc.channel_entry_preview.ee_addon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

moresoda

morePreview

An ExpressionEngine 2 add-on that allows you to preview entries from the EE control panel immediately after publishing. With correctly setup templates, it even allows you to preview entries with ‘closed’ status, allowing you to preview content on your site before it becomes live.

morePreview add-on allows you to preview entries after publishing

Info

Developed by Moresoda Design Ltd, http://moresoda.co.uk

Requirements

  • ExpressionEngine 2.1.3 +

Browser Compatibility

  • Firefox 2+
  • Safari 2+
  • Chrome 3+
  • Opera 9+
  • Internet Explorer 7+

Installation

  1. Copy the system/expressionengine/third_party/morepreview folder to your system/expressionengine/third_party/ folder.
  2. Go to Add-ons→Accessories in the ExpressionEngine control panel and install the accessory labelled morePreview.

Control Panel Configuration

The morePreview add-on utilizes ExpressionEngines native Live Look feature to preview your content from within the Control Panel. So for this add-on to work your must configure each channel’s Live Look Template.

  • You can configure a channel’s Live Look Template by going to Admin→Channel Administration→Channels and clicking Edit Preferences for the channel you wish to configure. You will find the Live Look Template options in the Path Settings section of the channel preferences.

Template Configuration

Basic

Due to the way the Live Look feature works, your templates must be able to respond to entry id’s being sent in the URL instead of the url title.

	//The more common ExpressionEngine URL pattern that utilizes URL titles for links
	http://www.yoursite.com/template_group/template/new-entry-url-title
	
	//The Live Look URL structure uses entry id's instead of url titles.
	http://www.yoursite.com/template_group/template/123

If you have used a simple implementation of the {exp:channel:entries} tag, and left dynamic=“on” (which is the default) and have not specified entry_id or url_title in the parameters, then EE will automatically switch from url titles to entry id’s automatically and the morePreview will work straight away.

For example, the following code is Live Look compatible.

	{exp:channel:entries channel="channel_name"}
		<h1>{title}</h1>
	{/exp:channel:entries}

Advanced

Non standard URL’s

If you are using non standard URL’s, then you need to be specific in the {exp:channel:entries} parameters about what segment ExpressionEngine should use:

	{exp:channel:entries channel="channel_name" entry_id="{segment_3}"}
		<h1>{title}</h1>
	{/exp:channel:entries}

Note: Remember that Live Look uses the entry id in its URL’s, not the url title.

Previewing Closed Entries

By instructing the {exp:channel:entries} to display closed entries, you can achieve a publishing workflow that allows you to preview entries before they go live on your site. By simply switching the entry’s status to “closed” and then submitting the ExpressionEngine publish form, you will be able to preview your new entry immediately.

For best results (and security), it is best to create a new template just for Live Look and then restrict access to the page for just your Member user group using ExpressionEngine’s Template Access Restriction feature. This will allow you to preview the page (since you are already logged into the Control Panel) but the general public will not be able to access this template without logging in.

Once this template has been created, the following code will allow you to view ‘closed’ entries securely.

	{exp:channel:entries channel="channel_name" status="open|closed"  show_future_entries="yes"}
		<h1>{title}</h1>
	{/exp:channel:entries}

Note: The show_future_entries parameter has been added in case you have set your entry_date to some point in the future

Change log

1.1

  • Renamed fieldtype to morePreview
  • Rearranged add-on folder structure to reflect EE folder structure
  • Added README and LICENCE

1.0

Public release

About

ExpressionEngine 2 accessory that allows you to preview newly published content from the control panel immediately after publishing (even if entry is closed).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages