August 04 2014

Joomla tinyMCE adding image with full path or full absolute urls

Tagged Under : ,

To set tinyMCE editor to full path or full absolute urls, inside tinyMCE.init add the “relative_urls” params to and set the value to “false“. Because this option is set to true by default.
relative_urls : false,
But in Joomla you are not allow directly change the javascript params to false. But you can pass the params in PHP when calling it.

Below is the example how to set the “relative_url” to false. and it work on Joomla2.5
$editor = JFactory::getEditor();
$params = array('relative_urls' => '0');
echo $editor->display('wrapper4_editor', $this->wrapper4content['content'], '100%', '400px', '', '', true,null, null, null, $params);

August 04 2014

Joomla use JPagination in application

Tagged Under :

To use JPagination inside the application. You need include the pagination classes inside the application.

You can using jimport to include the Pagination classes.
After that, pass the value to the class.
$total = 100; //the total number of items in a list
$limitstart = 0; //the offset of the item at which to start
$limit = 15; //the number of items to display per page
$pageNav = new JPagination($total, $limitstart, $limit);
After that, echo the pagination output using getListFooter.
echo $pageNav->getListFooter();
Now you can refresh the page and you will able see the pagination output as below: joomla pagination