J1.5

How to create a custom button

From Joomla! Documentation

Revision as of 23:31, 8 July 2008 by Masterchief (talk | contribs)

The "J1.5" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Quill icon.png
Content is Incomplete

This article or section is incomplete, which means it may be lacking information. You are welcome to assist in its completion by editing it as well. If this article or section has not been edited in several days, please consider helping complete the content.
This article was last edited by Masterchief (talk| contribs) 15 years ago. (Purge)

The code below is used for adding buttons to the back-end toolbar when developing components and modules.

Apply button[edit]

JToolBarHelper::apply();

Back button[edit]

JToolBarHelper::back();

Cancel button[edit]

JToolBarHelper::cancel();

Custom button[edit]

JToolBarHelper::custom( 'task', 'icon', 'icon over', 'alt', boolean, boolean );

Upload button[edit]

  • Method 1:
// Add an upload button and view a popup screen width 550 and height 400
$alt = "Upload";
$bar=& JToolBar::getInstance( 'toolbar' );
$bar->appendButton( 'Popup', 'upload', $alt, 'index.php', 550, 400 );
  • Method 2:
// You view button for popup media manager tools
JToolBarHelper::media_manager( '/' );