Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Edit button in item view 13 Jun 2016 13:19 #14048

Hi, great work on this tool. Very useful.

Been stuck on an issue for a while now. I need to be able to add an edit button to the item view on the front end.

I have read something about adding a form to the item view however this then shows both the fly an form on the same page.

Created a separate form view in items but cant find a way to link to it for editing.

Any help would be greatly appreciated.

Please Log in or Create an account to join the conversation.

Edit button in item view 13 Jun 2016 16:37 #14059

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I try to answer you with what I understood.
You would like a 'edit' task button on the item FLY page. Correct ?

I help you with the code, because you are new here so I write it for you.

Just add a toolbar button in the view :
Fork you view file (FRONT / ITEM). (view.html.php), the function displayXxxx(), where Xxxx is the alias name of your FLY template.

In this function you will find the toolbar definition.
Do not copy it all in your fork, just do :
protected function displayXxxx($tpl = null)
{
	// Keep the call of the original code, and fork AFTER
	parent::displayXxxx($tpl);

	// Define the CUSTOM task button, because Jooma do not propose it in native (who wants to PR that ?)
// TODO : Enter the name of your view in the first parameter before the '.'
// TODO : The last parameter should be a language string.
	CkJToolBarHelper::custom('[ViewName].edit', 'edit', 'edit', 'Edit');
}

I even tested it and it works for me.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.109 seconds

Real time saver and great Component Builder tool ! I have been developing with J-Cook Pro Component Builder for several months now and can say with all honesty that this product/service is second to none. The product is feature rich and is being improved and added to all the time. Do yourself a favor if you need to build a Joomla! Component then you can do no wrong in trying the product. You will save on time and effort while being able to deliver your project on time. J-Cook pro does the hard work for you you then have the freedom to fully customise the end result for your own needs. 

One word: Awesome.
Edwardcox (JED)
         

Get Started