Git Product home page Git Product logo

acc.channel_entry_preview.ee_addon's Introduction

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

acc.channel_entry_preview.ee_addon's People

Contributors

ckimrie avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.