Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3796198
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:11:58+00:00 2026-05-19T13:11:58+00:00

Hi I wanted help in a situation where I have a folder called ‘slides’

  • 0

Hi I wanted help in a situation where I have a folder called ‘slides’ and I have multiple text / html files in it like: slide1.html slide2.html slide3.html and so on…..

The structure of these files is like this:

<h2>Title of the Slide</h2>
<p><a href="http://mydomain.com"><img src="icon.png" width="227" height="227" alt="icon" longdesc="http://longdescription" /></a></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.</p>

3 properties Title, Image and the Description. One in each line.

———– UPDATE —————

I tried as suggested by @MATT but I am getting a blank screen: Here is the script of the entire page for reference. I am working on a Joomla template.

<?php
defined('JPATH_BASE') or die();
gantry_import('core.gantryfeature');

class GantryFeatureTabs extends GantryFeature {
    var $_feature_name = 'tabs';
    function init() {
        global $gantry;

        if ($this->get('enabled')) {
            $gantry->addScript('tabs.js');
            $gantry->addInlineScript($this->_tabs());
        }
    }
    function render($position="") {
        ob_start();
        foreach(glob("/tabs/*.html") as $fileName) {
        $fname = basename( $fileName );
        $curArr = file($fname);
        $slides[$fname ]['title'] = $curArr[0];
        $slides[$fname ]['image-links'] = $curArr[1];
        $slides[$fname ]['description'] = $curArr[2];

        foreach($slides as $key => $value){

            ?>
              <ul id="tabs1" class="tabs">
                <li>
                <a href="<?php echo $demo_tabs_url.$curArr; ?>"><?php echo $value['title'] ?></a>
                </li>
              </ul>
              <div class="clear"></div>
              <ul id="contents1" class="tabs-content">
                  <li>
                  <?php echo $value['image-links'] ?>
                  <?php echo $value['description'] ?>
                  </li>
              </ul>
            <?php
            }}
            ?>
        <?php
        return ob_get_clean();
    }
    function _tabs() {
        global $gantry;
        $js = "
            window.addEvent('load',function() {
                var tabset = new TabSet($$('#tabs1 li a'),$$('#contents1 li'),{
                    cookieName: 'demo-list'
                });
            });
        ";
        return $js;
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T13:11:59+00:00Added an answer on May 19, 2026 at 1:11 pm

    Try…

    <?php
    
    error_reporting(E_ALL);
    
    class GantryFeatureTabs extends GantryFeature 
    {
        $_feature_name = 'tabs';
        function init() {
            global $gantry;
    
            if ($this->get('enabled')) {
                $gantry->addScript('tabs.js');
                $gantry->addInlineScript($this->_tabs());
            }
        }
        function render($position="") {
            ob_start();
            foreach(glob("/tabs/*.html") as $fileName) {
            $fname = basename( $fileName );
            $curArr = file($fname);
            $slides[$fname ]['title'] = $curArr[0];
            $slides[$fname ]['image-links'] = $curArr[1];
            $slides[$fname ]['description'] = $curArr[2];
    }
    
            foreach($slides as $key => $value)
            {        
                ?>
                  <ul id="tabs1" class="tabs">
                    <li>
                    <a href="<?php echo $demo_tabs_url.$curArr; ?>"><?php echo $value['title'] ?></a>
                    </li>
                  </ul>
                  <div class="clear"></div>
                  <ul id="contents1" class="tabs-content">
                      <li>
                      <?php echo $value['image-links']; ?>
                      <?php echo $value['description']; ?>
                      </li>
                  </ul>
                <?php
            }
            return ob_get_clean();
        }
        function _tabs() {
            global $gantry;
            $js = "
                window.addEvent('load',function() {
                    var tabset = new TabSet($$('#tabs1 li a'),$$('#contents1 li'),{
                        cookieName: 'demo-list'
                    });
                });
            ";
            return $js;
        }
    }
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted following output from Zend_Form please help <form ...> <div class=labels><b>Name:</b></div> <input type=text
I wanted to see what folks thought were the best way to help junior
I wanted to do something like this: <asp:Label ID=lblMyLabel onclick=lblMyLabel_Click runat=server>My Label</asp:Label> I know
I have a situation where I need to update a control referenced in a
I have a situation where I need to generate a bunch of C# code
I have a situation where we want to prevent the update of a table
On several occations, I have faced the situation that the default.aspx page on a
I wanted to ask if anyone could help he get this code to work.
HI Everybody I wanted to use caching in my application can any one help
I wanted to read .bak files that are the backup files of my ms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.