Friday 19 April 2013

Add POP-UP feature for Image and Video in Joomla 2.5/3.0

To add or enable the Pop UP feature in Joomla 2.5 or 3.0 for Images and Videos; Please follow the following steps;
  1. Login into Joomla/Administrator
  2. Go to Template Manager
  3. Click on Templates
  4. Click on [Template Name] Details and Files link of your template in the Templates List.
  5. Click on the Edit main page template link of the Template Master Files.
  6. And, add the below code on the top of the file and Save it.
defined ( '_JEXEC' ) or die ( 'Restricted access' ); 
// Add the below code underneath the above line.
JHtml::_('behavior.modal');
Once you have done with above steps, to use of POP-UP function; Just add the class="model" in the anchor tag
Link

And, To add the Pop-UP for Videos, please download the Rokbox joomla plugin and install it. And, to use it, please follow the below example.

 
Click to Play Video

Monday 15 April 2013

Customize the Page Title in your Component Joomla 2.5/3.0

To customize the any Page Title, please follow the below instructions.

// Create the document object.
$docHTML = JFactory::getDocument();

// Fetch the Default Page title.
$defaultPageTitle = $docHTML->getTitle();

// Change the New page title as per your needs.
$newPageTitle = $pageTitle . ' - '. $docHTML->getTitle()

// Set the New Page Title.
$docHTML->setTitle(  $newPageTitle );

// To display the above set new page title.
Please, Open the Index.php file from the selected templates folder e.g. root/templates/yourSelectedTemplate/index.php. Then, add the below code on the top.
//And the below codes just underneath the 
defined ( '_JEXEC' ) or die ( 'Restricted access' ); 

// Display the Page Title.
$app = JFactory::getApplication(); 
$this->setTitle( $this->getTitle()  . ' - ' . $app->getCfg( 'sitename' ) );