Results 1 to 3 of 3

Thread: Sub Pages

  1. #1
    Join Date
    Oct 2007
    Location
    Nicaze
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Sub Pages

    In order to avoid creating many custom pages, and then link one to another, would like to have sub pages in a page.
    Im using php-fusion ,and want to insert something like "tabs" in a custom page, so that when you click on a link that it opens a content beneath and not that it redirects to another page...

    Have found ayax tabs content but dunno is it possible to integrate them, has any1 a better suggestion?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    Ajax is an option, as are frames.
    Best option is probably just using PHP and includes, based on the URL ("get" variables, like ?page=4) to display content on the page.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2007
    Location
    Nicaze
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well tryed frames found here:
    http://www.dynamicdrive.com/style/la...-frame-layout/
    A upper static, but when opened it goes over the whole window so...

    But have managed to integrate the ayax tabs:
    http://www.dynamicdrive.com/dynamici...tabcontent.htm

    I have found such a php code but could not make it happen:

    <?php
    //check of the page's mode (attribute) is set so we can define it for when its needed
    //we define the name of our KEY inside the $_GET array
    //and we will name it "mode" for this exercise
    //$_GET tells the PHP script to check the URL instead of a forms post action
    if (isset($_GET['mode'])){
    //define and multi-layer apply multi-layer sanitization to the mode variable
    $mode = strip_tags(stripslashes($_GET['mode']));
    //define the possible mode "about", url now looks like "?mode=about"
    if ($mode == "about"){
    //HTML that displays when "?mode=about" is requested by the browser
    echo "Welcome to my about page.<br />\n";
    //define the possible mode "contact", url now looks like "?mode=contact"
    } elseif ($mode == "contact"){
    //HTML that displays when "?mode=contact" is requested by the browser
    echo "Welcome to my contact page.<br />\n";
    //define the possible mode "other", url now looks like "?mode=other"
    } elseif ($mode == "other"){
    //HTML that displays when "?mode=other" is requested by the browser
    echo "Welcome to my other page.<br />\n";
    }
    } else {
    //since the $mode variable is not set as described above, we perform the default action:
    //page.php default message when no mode is set
    echo "When you access page.php directly with no URL attributes you will be given this message by your web browser.<br />\n";
    echo "The mode variable is not currently set by your PHP script.<br />\n";
    }
    //display some HTML that is shown below everything no matter if a mode is set or not
    echo "This bit of HTML is shown below all the pages: both the default page and all modes. <br />\n";
    ?>

    But dont know how to "activate" it :
    //since the $mode variable is not set as described above, we perform the default action:
    //page.php default message when no mode is set

    Lol

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •