MX Includes Forum :: Including a page once only

This thread was displayed: 0 times


Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.

For more information about the affected products visit: www.interaktonline.com/Support/

View Threaded Show descending
tom upton
06-10-2007 00:44:32 GMT +2

Hi guy's,

Im mega confused here. I have built a site using Mx Includes List, all pages are being pulled into an index page. I have "Included" an mp3 player at the top of my index page. Ok each time you navigate to a different page within thesite the mp3 track starts again. Is there anyway to stop this from happening??

Regards

Tom

http://manlikejez.co.uk

Back | Reply | Quote | Top
Guenter SchenkTeam InterAKT member
06-10-2007 17:39:28 GMT +2

Hi Tom,

you would have to use frames for this -- means having the player in one persistant frame and the other contents loaded in a different frame. What you´re experiencing, is "the nature of page requests" and has nothing to do with MX Includes.

Günter

Reply | Quote | Top
Willi Schneider
06-11-2007 12:57:05 GMT +2

Hallo Tom

I see, that you call all your included pages except the index page with the "mod" parameter.

So you could use another Interakt SB to only show the mp3-player when the mod-parameter is empty:

Search for the "Show if Conditonal Region" SB in your Server Behaviors panel; should be:

"MX Kollection" --> "Conditional Regions" --> "Show if Conditional Region"

Select your mp3-player region within your code and apply the "Show if..." SB.

Your code should then look like this:

 <?php
// Show IF Conditional region1
if ("mod" == "") {
?>
         This is the code where your mp3-player sits.

          <?php }
// endif Conditional region1
?>

The above code only shows your mp3-player if the mod parameter has no value, meaning, that when calling your index page, it will show, but when you call any other page (for example: http://manlikejez.co.uk/index.php?mod=charts) the mp3 player won't show.

However, there would be a better method to get what you want:

I would creat another include page that contains the code for the mp3-player, call it mp3.php.

Within dreamweaver you could add another "URL-variable":

  1. In the "Bindings" panel click the "+" button and add "mp3" as a URL-variable.
  2. In your "master page" create an include region that contains your "mp3.php" (Important: Choose "Server Side Include" - NOT" Server Side Include from list")
  3. Apply the "Show if Cond..." Server Behavior (see above, but set change the parameter settings from "mod" to your new URL-variable "mp3": Your code should now look like this:

    <?php
    // Show IF Conditional region1
    if ("mp3" == "1") {
    ?>
             <?php
      mxi_includes_start("path_to/mp3.php");
      require(basename("path_to/mp3.php"));
      mxi_includes_end();
    ?>

              <?php }
    // endif Conditional region1
    ?>

  4. Now you can call any page with the mod-parameter + you can decide, if you want the mp3-player and simply control it by adding "&mp3=1" to your link:

    http://manlikejez.co.uk/index.php?mod=charts

    does not show the player, but

    http://manlikejez.co.uk/index.php?mod=charts&mp3=1

    will display your charts-page and the player.

Hope that helps...

Cheers

 

Willi

Reply | Quote | Top
© Adobe Systems Romania. All rights reserved.