Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review
27Mar2023
Information
Print

Edit unpublished articles or K2 items in the front end of your site with Latest News Enhanced

Information
First published March 22, 2020
12797 hits - No rating
 

The latest versions of Latest News Enhanced (free or pro) can help you edit Joomla articles or K2 items on the public side of a site. In some instances, authors can even have access to their own unpublished content and edit it. This tutorial will guide you through all you need to know to setup your site properly.

Joomla articles - Step 1: Set up user permissions for font end edition access

First, go the the articles global configuration settings. Go to the Permissions tab.

Select the author to manage its settings.

Article permissions
The article permissions

There are 4 actions that have to be taken into considerations:

  • Edit if allowed, will give any author the permission to edit any article, even if he/she is not the creator of that article,
  • Edit state gives the author the permission to change the state of articles (unpublished to published for instance),
  • Edit own allows the author to edit his/her own articles only,
  • Edit custom field value is required if there are custom fields associated with the articles the author will edit, so that those fields can be enabled and not grayed out.

Set the values you see fit for your use case. Edit own allowed access is mandatory for frontend edition.

K2 items - Step 1: Set up group permissions for front end edition access

K2 handles access permissions a little differently. You need to set up an Author user group in K2 and make authors part of that group.

K2 user group permissions
The K2 user group permissions

In K2, there are 5 actions that have to be taken into considerations:

  • Frontend items editing this is required if you want to edit items in the front end,
  • Edit own items allows the authors to edit their own articles only,
  • Edit an item allows any author to edit anybody's item,
  • Publish items gives the author the permission to change the state of items (unpublished to published for instance),
  • Allow editing of already published items allows the modification of already publicly visible items.

Assign the right permissions following your own requirements. Make sure the category permissions are also setup properly for the group.

Step 2: Enable edition in Latest News Enhanced

Open an instance of the Latest News Enhanced module (for owners of a pro version, you can also setup a blog view).

Go to the layout tab, down to the Linking section. Set the Edit link parameter to Show.

Enable edition
Enable edition in Latest News Enhanced

Step 3 (module only): Make sure items with no dates are shown

Unpublished articles or K2 items may not have a publishing date. Latest News Enhanced allows you to discard items with no date so make sure this is NOT the case.

Go to the Selection tab, to the date section. Verify the parameter When no date.

Step 4 (optional): Setup authors selection

The extension selects all authors by default (so that everyone's articles can be seen). But there is a very useful option that allows only the logged authors to see their own articles.

Go to the Selection tab, in the authors section. Un-select All authors from the Authors parameter. Set to Auto instead.

Authors selection
Auto author selection

Step 5: Try your new setup

At this point, it would be interesting to try your new setup. Create a user John Doe and assign him to the Authors user group (remember, in K2, you assign the user to the K2 user group).

Create a couple articles (or K2 items if you want to set up Latest News Enhanced with K2) with Joe as the creator of those articles.

Log in as John Doe in the front end.

The following example shows a Latest News Enhanced module instance with 2 editable K2 items. The first one is unpublished and the second one is published. Unpublished items can only be edited (that is why there is no read more link).

Front end K2 items in module instance
Module instance setup for K2 with enabled edition

When an item is editable, a pen icon is shown. A click on the icon brings up the item in edition mode. For Joomla articles, the article opens in edition mode in the same window, but in K2, the item opens in a popup.

K2 item opened in edition mode
K2 item opened in a popup for edition

Additional information

Locked Joomla articles

When an article is edited in the administrator console, it is locked in the front end. The same way, an article is locked in the back end if it is edited in the front end.

Locked article in the front end
Locked article in the front end

Locked K2 items

The locking mechanism is a bit different in K2. When an author edits an item in the front end, that item is locked for edition in the administrator console until the author logs out. They are locked out again in the back end after the user logs in unless the item has been edited in the back end in the meantime.

Locked K2 items
Locked K2 items in the administrator console

In the front end, an item is locked if it is edited in the back end.

Visually differentiating unpublished items

Each unpublished item in Latest News Enhanced is assigned a CSS class unpublished.
For instance:

.latestnews-item.unpublished { opacity: 0.6; }

will add opacity to the unpublished items.

Final note

The extension Latest News Enhanced does not create the pages for the articles in edition mode. These pages are setup in the Content or K2 components.

If you need to disable article versioning, for instance, this needs to be changed in the article's global configuration Editing layout tab.

For K2, go to the Global ConfigurationSite tab, down to the Frontend editing section.

Downloads