-
AuthorPosts
-
ar2solutions Friend
ar2solutions
- Join date:
- August 2009
- Posts:
- 74
- Downloads:
- 5
- Uploads:
- 5
- Thanks:
- 26
- Thanked:
- 5 times in 1 posts
March 21, 2010 at 2:47 am #149682Hi 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 Friendhisteriks
- Join date:
- December 2009
- Posts:
- 285
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 16
- Thanked:
- 114 times in 87 posts
March 21, 2010 at 12:11 pm #337060Hi 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 Friendar2solutions
- Join date:
- August 2009
- Posts:
- 74
- Downloads:
- 5
- Uploads:
- 5
- Thanks:
- 26
- Thanked:
- 5 times in 1 posts
March 21, 2010 at 6:54 pm #337098histeriks,
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 Friendhisteriks
- Join date:
- December 2009
- Posts:
- 285
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 16
- Thanked:
- 114 times in 87 posts
March 21, 2010 at 8:29 pm #337106ar2solutions;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 Friendhisteriks
- Join date:
- December 2009
- Posts:
- 285
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 16
- Thanked:
- 114 times in 87 posts
March 22, 2010 at 10:08 pm #337294You 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 Friendar2solutions
- Join date:
- August 2009
- Posts:
- 74
- Downloads:
- 5
- Uploads:
- 5
- Thanks:
- 26
- Thanked:
- 5 times in 1 posts
March 22, 2010 at 10:18 pm #337295histeriks,
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 Friendhisteriks
- Join date:
- December 2009
- Posts:
- 285
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 16
- Thanked:
- 114 times in 87 posts
March 22, 2010 at 10:23 pm #337296ar2solutions;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! 🙂
1 user says Thank You to histeriks for this useful post
ar2solutions Friendar2solutions
- Join date:
- August 2009
- Posts:
- 74
- Downloads:
- 5
- Uploads:
- 5
- Thanks:
- 26
- Thanked:
- 5 times in 1 posts
March 22, 2010 at 10:28 pm #337297LOOKS 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 -->
1 user says Thank You to ar2solutions for this useful post
-
AuthorPosts
This topic contains 9 replies, has 3 voices, and was last updated by macout 14 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum