Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Thursday, May 21, 2009

Joomla! 1.5 Adding to the Breadcrumb/PathWay through the Joomla Framework

Joomla's JPathway class allows you to add a new item to the pathway to be displayed in the Breadcrumb.

The first thing to do is to access the global JApplication object, then get a reference to the JPathway object.

<?php 
global $mainframe;
$breadcrumbs = &$mainframe->getPathWay();
?>
Adding a breadcrumb is now as simple as calling the JPathway::addItem() method. The addItem method takes a name as the first parameter and a link as the second parameter.
<?php 
$breadcrumbs->addItem( 'My Crumb!', JRoute::_('index.php?option=com_mycrumb') );
?>

If your Item is the last item on the breadcrumb the link will be ignored.

Wednesday, October 22, 2008

Joomla! 1.5 Getting the modal dialog to work

Today I quickly want to show you how to get the Joomla! 1.5 Modal Dialog (SqueezeBox - Expandable Lightbox) to work in any of your components or modules. It's actually quite easy to do since the Joomla! team did such a great job at making mootools part of the solution. JHTML to the rescue! :)

In this example I'm going to make a normal anchor open up a Modal dialog. Are you ready?

Within your php code tags enter the following:

<?php
JHTML::_('behavior.modal', 'a.modal-button');
?>

Add an anchor and the following to the anchor:


<a href="http://www.google.com/" class="modal-button" rel="{handler: 'iframe', size: {x: 725, y: 520}}">MyMooModal</a>


And that is all there is to it. You can specify ANY link and it will open in the Modal Dialog

Monday, July 14, 2008

keepr

Today I would like to introduce keepr, a php cms/framework I am working on in my free time.

It all started in May/June 2007. I was without a job and needed something to help me deliver projects faster without forcing me to change the way I like to code. It impliments the way I see Model-View-Controller for the web environment using PHP XTemplate

I launched a GNU GPL version 3 at the following url http://code.google.com/p/keepr/ . There is no downloads yet by the full source is available at Source/Browse under trunk.