Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • emmlnbn Friend
    #154243

    I have used the code below – to create an overwrite many times.It has worked very well – thank you!
    Now however – I need to create an overwrite for a page that has no menu ID. ( I do not want to have a viable link to this page from the menu. ) I tried creating a link to it from a hidden menu – that has not helped either . Please advise
    thank you

    <?php
    /*
    $JA#COPYRIGHT$
    */

    // no direct access
    defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );
    $this->_basewidth = 20;
    $positions = array (
    ‘left1’ =>”,
    ‘left2’ =>”,
    ‘left-mass-top’ =>”,
    ‘left-mass-bottom’ =>”,
    ‘right1’ =>”,
    ‘right2’ =>”,
    ‘right-mass-top’ =>”,
    ‘right-mass-bottom’ =>”,
    ‘content-mass-top’ =>”,
    ‘content-mass-bottom’ =>”,
    ‘content-top’ =>’content-top’,
    ‘content-bottom’ =>’content-bot’,
    ‘inset1’ =>”,
    ‘inset2’ =>”
    );

    $this->definePosition ($positions);
    ?>

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

    <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”<?php echo $this->language; ?>” lang=”<?php echo $this->language; ?>”>

    <head>
    <?php $this->loadBlock(‘head’) ?>
    </head>

    <body id=”bd” class=”fs<?php echo $this->getParam(JA_TOOL_FONT);?> <?php echo $this->browser();?>”>

    <div id=”ja-wrapper”>
    <a name=”Top” id=”Top”></a>

    <!– HEADER –>
    <?php $this->loadBlock(‘header’) ?>
    <!– //HEADER –>

    <!– MAIN NAVIGATION –>
    <?php $this->loadBlock(‘mainnav’) ?>
    <!– //MAIN NAVIGATION –>

    <?php $this->loadBlock(‘topsl’) ?>

    <!– MAIN CONTAINER –>
    <div id=”ja-container” class=”wrap <?php echo $this->getColumnWidth(‘cls_w’); ?>”>
    <div class=”main clearfix”>

    <div id=”ja-mainbody” style=”width:<?php echo $this->getColumnWidth(‘mw’) ?>%”>
    <?php $this->loadBlock(‘main’) ?>
    <?php $this->loadBlock(‘left’) ?>
    </div>

    <?php $this->loadBlock(‘right’) ?>

    </div>
    </div>
    <!– //MAIN CONTAINER –>

    <?php $this->loadBlock(‘botsl’) ?>

    <!– FOOTER –>
    <?php $this->loadBlock(‘footer’) ?>
    <!– //FOOTER –>

    </div>

    <jdoc:include type=”modules” name=”debug” />

    <?php if ($this->isIE6()) : ?>
    <?php $this->loadBlock(‘ie6/ie6warning’) ?>
    <?php endif; ?>

    </body>

    </html>

    Saguaros Moderator
    #355315

    Now, please see those code:
    [PHP]

    $positions = array (
    ‘left1’ =>”,
    ‘left2’ =>”,
    ‘left-mass-top’ =>”,
    ‘left-mass-bottom’ =>”,
    ‘right1’ =>”,
    ‘right2’ =>”,
    ‘right-mass-top’ =>”,
    ‘right-mass-bottom’ =>”,
    ‘content-mass-top’ =>”,
    ‘content-mass-bottom’ =>”,
    ‘content-top’ =>’content-top’,
    ‘content-bottom’ =>’content-bot’,
    ‘inset1’ =>”,
    ‘inset2’ =>”
    );

    $this->definePosition ($positions);

    [/PHP]

    now, you will make as following:

    [PHP]
    if( (int) JRequest::getVar(“Itemid”) > 0 ) {
    $positions = array (
    ‘left1’ =>”,
    ‘left2’ =>”,
    ‘left-mass-top’ =>”,
    ‘left-mass-bottom’ =>”,
    ‘right1’ =>”,
    ‘right2’ =>”,
    ‘right-mass-top’ =>”,
    ‘right-mass-bottom’ =>”,
    ‘content-mass-top’ =>”,
    ‘content-mass-bottom’ =>”,
    ‘content-top’ =>’content-top’,
    ‘content-bottom’ =>’content-bot’,
    ‘inset1’ =>”,
    ‘inset2’ =>”
    );
    } else{
    $positions = array (
    ‘left1’ =>”,
    ‘left2’ =>”,
    ‘left-mass-top’ =>”,
    ‘left-mass-bottom’ =>”,
    ‘right1’ =>”,
    ‘right2’ =>”,
    ‘right-mass-top’ =>”,
    ‘right-mass-bottom’ =>”,
    ‘content-mass-top’ =>”,
    ‘content-mass-bottom’ =>”,
    ‘content-top’ =>’content-top’,
    ‘content-bottom’ =>’content-bot’,
    ‘inset1′ =>’insert1’,
    ‘inset2′ =>’insert2’
    );
    }

    $this->definePosition ($positions);
    [/PHP]

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  Saguaros 14 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum