Do you know that joomla has a built in library for tabs and sliders? It is available in joomla 1.5 inside the JPane class, It is an abstract class that has seven methods. The getInstance method in JPane class return reference to a JPanel object either tabs or sliders. The following code get the object of tabs and sliders.
//include first the JPane class
jimport('joomla.html.pane');
//JPaneTabs instance
$myTabs = & JPane::getInstance('tabs',array('startOffset'=>0));
//JPaneSliders instance
$mySliders = & JPane::getInstance('sliders',
array('startOffset'=>0));
First, We include the JPane class using the jimport function and create an instance for tabs or sliders. Now, we will use the other four methods. An example implimentation of Tabs will look as follows:
//Create the pane $html = ''; $html .= $myTabs->startPane( 'mytabs' ); //Create the 1st Tab $html .= $myTabs->startPanel( 'Tab-1', 'tab1' ); $html .= 'This is the first tab
'; $html .= $myTabs->endPanel(); //Create the 2nd Tab $html .= $myTabs->startPanel( 'Tab-2', 'tab2' ); $html .= 'This is the second tab
'; $html .= $myTabs->endPanel(); //End Pane $html .= $myTabs->endPane(); //show it now echo $html;
And for the sliders:
//Create the pane $html = ''; $html .= $mySliders->startPane( 'mysliders' ); //Create the 1st slider $html .= $mySliders->startPanel( 'Slider-1', 'slider1' ); $html .= 'This is the first slider
'; $html .= $mySliders->endPanel(); //Create the 2nd slider $html .= $mySliders->startPanel( 'Slider-2', 'slider2' ); $html .= 'This is the second slider
'; $html .= $mySliders->endPanel(); //End Pane $html .= $mySliders->endPane(); //show it now echo $html;
That is it. Have fun!
Post to: BlinkBits BlogMarks Del.icio.us Digg Fark Furl Google Ma.gnolia MyWeb Netscape NetVouz Newsvine RawSugar Reddit Scuttle Shadows Simpy Slashdot Spurl Technorati Wists
Friday, June 26th, 2009
Comments
![]() |
Do you have any suggestions? Add your comment. Please don't spam! Subscribe to my feed |
sir pwede pa help?????? about sa JOOMLA...... baguhan pa po ako.. asan makikita ang JPane Class...... PLZ SIR... simojt_leokristoffer@yahoo.com ako email sir...
The path is libraries/joomla/html/pane.php. Follow the link below for the documentation.
http://api.joomla.org/Joomla-Framework/HTML/JPane.html
sir may joomla website po ako na try.... anu po maganda e dag2x po??? plz help me..... and d ko talaga gets ang Jpane sir.... ito po yung link http://dota4fun.co.cc
Hi chester, your site is all about dota games, I also play dota. Anyway follow the link below, you can find more free joomla extensions that you can install in your site.
http://extensions.joomla.org
sir Rob thank you... taga surigao ka sir ROB? mudawat ka ng thesis sir ROB?? aw player baja u sir??? hehehe duwa ta panagsa....
Taga surigao sad bja kaw? hehe, Dili ko mohimo ug thesis kay dili ko ka lugar, busy ko. Sure, dili ko abtik sa dota ha noob rako.. hehe..
Pa humble effect pa man ka sir ROB... k sir Rob busy baja kaw sa SIM ug sa SCION hehehehehehe.. salamat sa site na imu tag hatag sa ako para sa mga module sa joomla....
Ahak pa noob noob pa mga dota players. Ari diri dula ta generals. He he. Ayaw kumpyansa anang rob. Dili na mapildi ug dota.
wahahahahaha nawa lage daan ko pa abtik jud... kay c sir meme gane abtik pud mu dota sa K1
haha abtik mO lang...
champion na sa GG.. . .
sossssssss... jaw mo pglalis ky ngkalisod nku nghimo nn robot.. ako pa sa ijo tabangi ko dri pgcompile sa mga file.. i want a electronics,programmer,and COE..hehehe ky akoy mag.assembol nn mga parts sa robot.. terminator ni xa ako palihokon sa ijo mga talent..hehehe
Chester, kabalo man ka lagi na cge ko sa scion. hmm.. Cguro muapilay ka ug scinettek noh? Pede ta magdula sa scion ug dota ug general kauban si sir rambaldi ug si luciferia, dili nato pa apilon si John fabre.. hehe..
haha . . uU
pnLaban namO sa generals c Guerta(bOyLabO) haha
sorry sir robert dugay naku wa ka reps kay nadaot ako antenna kay ako tag config ako canopy...... hehehehehe naguba... nawala ako internet..... sure duwa dota??? d lang ko maayo..........
salamat sa INVI..............
can u please give us the example in detail on how to include this. We have tried it but we are getting some errors
TSK TSK.................. musta sir expert?
Ok ra. tapos n thesis?
Write a comment
* = required field
Save to del.icio.us 