0
Welcome Guest! Login
0 items Join Now

SOLVED Accordion for Rt_gantry_j16. Help needed.

  • SOLVED Accordion for Rt_gantry_j16. Help needed.

    Posted 10 years 8 months ago
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 22291
    • Thanks: 3227
    • messin' with stuff

    Re: SOLVED Accordion for Rt_gantry_j16. Help needed.

    Posted 10 years 8 months ago
    • That's pretty old version of Gantry... I'd recommend updating...

      RokSprocket Lists layout has an Accordian feature...
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: SOLVED Accordion for Rt_gantry_j16. Help needed.

    Posted 10 years 8 months ago
    • Hello,

      I solved the problem, searching the internet and found those URL :
      tutsforu.com/adding-javascript-and-style...t-to-joomla-2-5.html
      www.aldoapp.com/tutorials/2-a-must-have-...la-code-snippet.html

      Here is what I did to solve the issue :
      1/ Open my_site\components\com_content\views\article\view.html.php
      2/ Add line 46 this stuff (in the function display) :

          //Added to load Accordion effect - Only on FAQ, Article ID=xx, to avoid loading Mootools-More on all pages
      		
      		$article_id  = JFactory::getApplication()->input->get('id');
      		if ($article_id=="15") {
      		//Load Mootools-More 
      		JHtml::_('behavior.framework', true);
      		//Javascript declaration
      		$document =Jfactory::getDocument();
      		$document->addScriptDeclaration('
      			window.addEvent(\'domready\', function( ){
      			navAcc = new Accordion( $$( ".accordion .accT" ), $$( ".accordion .accE" ), {display: -1, alwaysHide: true} );
      			})');
      			};
      		//End of added

      3/ then I added my questions and answers as on this page, in my article (thus article ID mentioned before [15 in my case] ):
      phptechnologytutorials.wordpress.com/201...le-joomla-accordion/

      <div class="accordion">
      <h1>Creating Mootools accordion or simple slider</h1>
      <a class="accT"><h1>Link 1 Container 1</h1></a>
      <div class="accE">
      <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
      </div>
      <a class="accT"><h1>Link 2 Container 2</h1></a>
      <div class="accE">
      <p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur in section 1.10.32.</p>
      <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries,  of Lorem Ipsum.</p>
      </div>
      <a class="accT"><h1>Link 3 Container 3</h1></a>
      <div class="accE">
      <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
      </div>
      </div>

      No other modification has been made. Simple as that, eventhough it took me a few hours to figure that out...

      All the best,

      Philippe
    • Last Edit: 10 years 8 months ago by philippe combet.
    • The following users have thanked you: Matt

Time to create page: 0.052 seconds