Documentation

Below you will find documentation on how to use our software. This contains easy-to-use steps by step guides with helpful screenshots on how to configure and get the best results.
 

Categories

Chapter 3: Using Ajax

The basis of how we implement read and update operations when we edit our inline editable content, is that we use Ajax to do this, more specifically, we use Joomla’s com_ajax component.

We shall, now, go into detail on how to use our framework, to implement read and update operations for your component.

Okay, if you remember when we created our folder structure for our package, for inline editing support, we created three files: one for each editable type.

+files_inlinemycck   [FILES_INLINE + COMPONENT NAME]
|
------+contexts
	|
---+mycck            [COMPONENT NAME]
         |
	   -----category.php  	[TYPE NAME as explained in XML]
	   |
	   -----item.php        [TYPE NAME as explained in XML]
	   |
	   -----blog.php        [TYPE NAME as explained in XML]
|
index.html
|
inlinemyck.xml  [INLINE +  COMPONENT NAME].xml

As you can see, we have three inline editable types in our component:

  1. Category
  2. Item
  3. Blog

In each file, we will create a class that extends the ArkContextsBase. This is the class provided to us by the inline editing framework, that will allow us to do what we discussed above:

  1. Read the data from the database, for the specified inline type
  2. Save any updates made by the end user, on inline editing
  3. render/transform the data back to the user, after saving as it was before any inline editing

The abstract ArkContextsBase contains three methods that will allow our extended class to read, update and render the content for our inline types. 

abstract class ArkContextsBase
{
	public function get()

	public function triggerContentPlugins($rawText)
	
	public function save($data,$type = 'body'){}
}

Let us now see how this works for our simple MyCCK component, in the next section.

 

WebxSolution Ltd is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.

Copyright © 2009 - 2016 WebxSolution Ltd
Powered by JoomlaWired