nwrightau VIP
Total posts: 99
16 Sep 2014 04:50

Hi Guys, wanting to move the cobalt edit menu [delete,unpublish,version control,etc] up into my header - ideally call some php code or a module in the main template.

Looking at the template overrides, just wondering if someone can point me in the right direction.

Thanks

Last Modified: 19 Sep 2014


Konstantin
Total posts: 1,113
16 Sep 2014 08:04

You can't do it in the list, because this menu binding with each record in the list.

In full view you can use

$item->controls

to get that links.

If you look into default template of full article view, you can find where used this. We haven't some special code for this.

This list of links in this variable is already filtered for current user and consist actions only allowed for him. If you dont care about this you can create your own static links where will be dynamecally change only id of current record and return var, this id will be in the POST on page load.


Sergey
Total posts: 13,748
16 Sep 2014 08:12

There is no access to that menu from Joomla template. Only from Cobalt templates.


nwrightau VIP
Total posts: 99
18 Sep 2014 06:32

I wrote a javascript plugin that constructs its own menu from the available cobalt menu options and hides the cobalt menu when done.

This way I can customise the menu to make a better front end editing experience.

One more quesiton though, in front end you have 'delete' - is there any trash or recycle bin? Or are items gone for good? I've added a confirm script to stop accidental deletion but it would be even better if they were trashed instead of entirely removed.


Sergey
Total posts: 13,748
18 Sep 2014 09:46

There is audit log. If you eneable it article is deleted but you can restore it. Or change versions.


nwrightau VIP
Total posts: 99
18 Sep 2014 23:08

Sergey There is audit log. If you eneable it article is deleted but you can restore it. Or change versions.

That's great, can this be done from the audit log? Or somewhere else?


Sergey
Total posts: 13,748
19 Sep 2014 01:02

Yes. Enable Audit log in type paramters. Create link to audit log in frontend.

Powered by Cobalt