test
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • ar2solutions Friend
    #149682

    Hi guys,

    I know you can change the position of the code(s) in index.php but i can’t seem to find it!

    But i’m simply trying to add some sort of text (article… a simple about us) BEFORE the product feature mod and popular mod …

    By defaults, the home-page position for main-content is:

    1st) Featured Products
    2nd) popular product
    3rd) some article.

    Or if you wanna get technical, i want it to be like this:

    1) ja-content wrap
    2) ja-product wrap

    🙂

    thanks!

    histeriks Friend
    #337060

    Hi ar2solutions,

    please, open main.php file, located in layouts/blocks directory of your template, select and cut everything from line 33 to line 87:

    <div id="ja-contentwrap" class="<?php echo $this->getColumnWidth('cls_m'); ?>">
    <?php
    $inset1 = $this->getPositionName ('inset1');
    $inset2 = $this->getPositionName ('inset2');
    ?>
    <div id="ja-content" style="width:<?php echo $this->getColumnWidth('cw') ?>%">

    <div id="ja-current-content">
    <?php
    $content_top = $this->getPositionName ('content-top');
    if($this->countModules($content_top)) : ?>
    <div class="ja-content-top clearfix">
    <jdoc:include type="modules" name="<?php echo $content_top;?>" style="JAxhtml" />
    </div>
    <?php endif; ?>

    <?php $contents = $this->getBuffer('component');
    if (!preg_match ('/<div class="blog">s*</div>/',$contents)) :?>
    <div class="ja-content-main clearfix">

    <div class="inner clearfix">
    <?php if($this->countModules('breadcrumb')): ?>
    <div id="ja-pathway">
    <strong><?php echo JText::_('You are here');?></strong><jdoc:include type="modules" name="breadcrumb" /></div>
    <?php endif; ?>

    </div>
    <jdoc:include type="component" />
    </div>
    <?php endif; ?>

    <?php
    $content_bottom = $this->getPositionName ('content-bottom');
    if($this->countModules($content_bottom)) : ?>
    <div class="ja-content-bottom clearfix">
    <jdoc:include type="modules" name="<?php echo $content_bottom;?>" style="JAxhtml" />
    </div>
    <?php endif; ?>
    </div>

    <?php if($this->countModules($inset1)) : ?>
    <div class="ja-col column ja-inset1" style="width:<?php echo $this->getColumnWidth('i1') ?>%">
    <jdoc:include type="modules" name="<?php echo $inset1;?>" style="JAxhtml" />
    </div>
    <?php endif; ?>

    </div>

    <?php if($this->countModules($inset2)) : ?>
    <div class="ja-col column ja-inset2" style="width:<?php echo $this->getColumnWidth('i2') ?>%">
    <jdoc:include type="modules" name="<?php echo $inset2;?>" style="JAxhtml" />
    </div>
    <?php endif; ?>
    </div>

    and paste it on line 4 of the same file, so that it looks like this:

    <!-- CONTENT -->
    <div id="ja-main" style="width:<?php echo $this->getColumnWidth('m') ?>%">
    <div class="inner clearfix">
    <div id="ja-contentwrap" class="<?php echo $this->getColumnWidth('cls_m'); ?>">
    <?php
    $inset1 = $this->getPositionName ('inset1');
    $inset2 = $this->getPositionName ('inset2');
    ?>
    <div id="ja-content" style="width:<?php echo $this->getColumnWidth('cw') ?>%">

    <div id="ja-current-content">
    <?php
    $content_top = $this->getPositionName ('content-top');
    if($this->countModules($content_top)) : ?>
    <div class="ja-content-top clearfix">
    <jdoc:include type="modules" name="<?php echo $content_top;?>" style="JAxhtml" />
    </div>
    <?php endif; ?>

    <?php $contents = $this->getBuffer('component');
    if (!preg_match ('/<div class="blog">s*</div>/',$contents)) :?>
    <div class="ja-content-main clearfix">

    <div class="inner clearfix">

    </div>
    <jdoc:include type="component" />
    </div>
    <?php endif; ?>

    <?php
    $content_bottom = $this->getPositionName ('content-bottom');
    if($this->countModules($content_bottom)) : ?>
    <div class="ja-content-bottom clearfix">
    <jdoc:include type="modules" name="<?php echo $content_bottom;?>" style="JAxhtml" />
    </div>
    <?php endif; ?>
    </div>

    <?php if($this->countModules($inset1)) : ?>
    <div class="ja-col column ja-inset1" style="width:<?php echo $this->getColumnWidth('i1') ?>%">
    <jdoc:include type="modules" name="<?php echo $inset1;?>" style="JAxhtml" />
    </div>
    <?php endif; ?>

    </div>

    <?php if($this->countModules($inset2)) : ?>
    <div class="ja-col column ja-inset2" style="width:<?php echo $this->getColumnWidth('i2') ?>%">
    <jdoc:include type="modules" name="<?php echo $inset2;?>" style="JAxhtml" />
    </div>
    <?php endif; ?>
    </div>

    <?php if ( !$this->isContentEdit() && ($this->countModules('vm-fp') || $this->countModules('ja-slider')) ) { ?>
    <div id="ja-productwrap"><div id="ja-product-bot"><div id="ja-product-top" class="clearfix">

    <?php if ( $this->countModules('vm-fp') ) { ?>
    <div id="ja-fp">
    <jdoc:include type="modules" name="vm-fp" style="JAxhtml" />
    </div>
    <?php } ?>

    <?php if ( $this->countModules('ja-slider') ) { ?>
    <div id="ja-slider">
    <jdoc:include type="modules" name="ja-slider" style="JAxhtml" />
    </div>
    <?php } ?>

    </div></div></div>
    <?php } ?>

    <jdoc:include type="message" />

    <?php
    $mass_top = $this->getPositionName ('content-mass-top');
    if($this->countModules($mass_top)) : ?>
    <div class="ja-mass ja-mass-top clearfix">
    <jdoc:include type="modules" name="<?php echo $mass_top;?>" style="JAxhtml" />
    </div>
    <?php endif; ?>

    <?php
    $mass_bottom = $this->getPositionName ('content-mass-bottom');
    if($this->countModules($mass_bottom)) : ?>
    <div class="ja-mass ja-mass-bottom clearfix">
    <jdoc:include type="modules" name="<?php echo $mass_bottom;?>" style="JAxhtml" />
    </div>
    <?php endif; ?>

    </div>
    </div>
    <!-- //CONTENT -->

    Save, upload and you should have content before modules on frontpage.

    Please, keep in mind that i didn’t test this thoroughly, i just cut’n’pasted, saved and checked the order. If you run into any problem, please report back so we can fix it properly.

    Good luck 😉

    ar2solutions Friend
    #337098

    histeriks,

    thanks for the quick reply!

    when i saved the file, the positions got more skewed up and ALL the modules, ja-slider, content were not in their correct place…. I’m trying to figure this out but to no avail. hmmm… i’m beginning to wonder if just replacing the position of code (one before another) will work with this template…

    anyway, please let me know if you need more information,

    thanks!!

    histeriks Friend
    #337106

    ar2solutions;170543histeriks,

    thanks for the quick reply!

    when i saved the file, the positions got more skewed up and ALL the modules, ja-slider, content were not in their correct place…. I’m trying to figure this out but to no avail. hmmm… i’m beginning to wonder if just replacing the position of code (one before another) will work with this template…

    anyway, please let me know if you need more information,

    thanks!!

    It works correctly here with last Zeolite II quickstart. Did you try to replace everything in main.php with my second code listing, just to rule out the possibility of an error due to page line numbering differences?
    Please, send me your FTP and Joomla administrator account login over PM and I’ll see what i can do.

    histeriks Friend
    #337294

    You made a mistake somewhere, i have overwritten your main.php with one that has switched positions like in the example above and everything’s OK now.

    You still have some tweaking to do however.

    Good luck! 🙂

    ar2solutions Friend
    #337295

    histeriks,

    I’ve done the tweaking but i have just one more problem. It seems that the breadcrumbs are now showing in 2 places)

    1) Default Position
    2) Homepage — on top of the main article (one that you just switched codes with)

    I double checked the breadcrumb module to see if any thing was wrong there but its all normal.

    ???

    thanks!

    histeriks Friend
    #337296

    ar2solutions;170778histeriks,

    I’ve done the tweaking but i have just one more problem. It seems that the breadcrumbs are now showing in 2 places)

    1) Default Position
    2) Homepage — on top of the main article (one that you just switched codes with)

    I double checked the breadcrumb module to see if any thing was wrong there but its all normal.

    ???

    thanks!

    Whoo, sorry, i inserted the breadcrumbs in main.php to help the guy on another topic and i forgot to remove them.

    Check now, i removed them from that position.

    Sorry once again! 🙂

    ar2solutions Friend
    #337297

    LOOKS GOOD!

    JUST LIKE I WANTED!!

    THANKS FOR YOU HELP HISTERIKS!

    in case people are still confused, here is my mail.php file:

    <!-- CONTENT -->

    <div id="ja-main" style="width:<?php echo $this->getColumnWidth('m') ?>%">

    <div class="inner clearfix">

    <div id="ja-contentwrap" class="<?php echo $this->getColumnWidth('cls_m'); ?>">

    <?php

    $inset1 = $this->getPositionName ('inset1');

    $inset2 = $this->getPositionName ('inset2');

    ?>

    <div id="ja-content" style="width:<?php echo $this->getColumnWidth('cw') ?>%">

    <div id="ja-current-content">

    <?php

    $content_top = $this->getPositionName ('content-top');

    if($this->countModules($content_top)) : ?>

    <div class="ja-content-top clearfix">

    <jdoc:include type="modules" name="<?php echo $content_top;?>" style="JAxhtml" />

    </div>

    <?php endif; ?>

    <?php $contents = $this->getBuffer('component');

    if (!preg_match ('/<div class="blog">s*</div>/',$contents)) :?>

    <div class="ja-content-main clearfix">

    <div class="inner clearfix">

    <?php if($this->countModules('breadcrumb')): ?>

    <div id="ja-pathway">

    <strong><?php echo JText::_('You are here');?></strong><jdoc:include type="modules" name="breadcrumb" /></div>

    <?php endif; ?>

    </div>

    <jdoc:include type="component" />

    </div>

    <?php endif; ?>

    <?php

    $content_bottom = $this->getPositionName ('content-bottom');

    if($this->countModules($content_bottom)) : ?>

    <div class="ja-content-bottom clearfix">

    <jdoc:include type="modules" name="<?php echo $content_bottom;?>" style="JAxhtml" />

    </div>

    <?php endif; ?>

    </div>

    <?php if($this->countModules($inset1)) : ?>

    <div class="ja-col column ja-inset1" style="width:<?php echo $this->getColumnWidth('i1') ?>%">

    <jdoc:include type="modules" name="<?php echo $inset1;?>" style="JAxhtml" />

    </div>

    <?php endif; ?>

    </div>

    <?php if($this->countModules($inset2)) : ?>

    <div class="ja-col column ja-inset2" style="width:<?php echo $this->getColumnWidth('i2') ?>%">

    <jdoc:include type="modules" name="<?php echo $inset2;?>" style="JAxhtml" />

    </div>

    <?php endif; ?>

    </div>

    <?php if ( !$this->isContentEdit() && ($this->countModules('vm-fp') || $this->countModules('ja-slider')) ) { ?>

    <div id="ja-productwrap"><div id="ja-product-bot"><div id="ja-product-top" class="clearfix">

    <?php if ( $this->countModules('vm-fp') ) { ?>

    <div id="ja-fp">

    <jdoc:include type="modules" name="vm-fp" style="JAxhtml" />

    </div>

    <?php } ?>

    <?php if ( $this->countModules('ja-slider') ) { ?>

    <div id="ja-slider">

    <jdoc:include type="modules" name="ja-slider" style="JAxhtml" />

    </div>

    <?php } ?>

    </div></div></div>

    <?php } ?>

    <jdoc:include type="message" />

    <?php

    $mass_top = $this->getPositionName ('content-mass-top');

    if($this->countModules($mass_top)) : ?>

    <div class="ja-mass ja-mass-top clearfix">

    <jdoc:include type="modules" name="<?php echo $mass_top;?>" style="JAxhtml" />

    </div>

    <?php endif; ?>

    <?php

    $mass_bottom = $this->getPositionName ('content-mass-bottom');

    if($this->countModules($mass_bottom)) : ?>

    <div class="ja-mass ja-mass-bottom clearfix">

    <jdoc:include type="modules" name="<?php echo $mass_bottom;?>" style="JAxhtml" />

    </div>

    <?php endif; ?>

    </div>

    </div>

    <!-- //CONTENT -->

    macout Friend
    #339558

    Thanks for sharing that. I wanted to do the same thing and you guys have just made it oh so easy – cheers!

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

This topic contains 9 replies, has 3 voices, and was last updated by  macout 14 years, 8 months ago.

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