-
AuthorPosts
-
railer Friend
railer
- Join date:
- October 2007
- Posts:
- 236
- Downloads:
- 102
- Uploads:
- 9
- Thanks:
- 17
- Thanked:
- 24 times in 1 posts
June 10, 2011 at 3:40 pm #165082Hi Joomlart,
How would I apply the code referred to in this related post to the JA Zeolite ii template?
I tried using it in several places in the main.php file, but it just makes everything disappear.
Please advise.
Thanks,
railerthangnn1510 Friendthangnn1510
- Join date:
- October 2014
- Posts:
- 1608
- Downloads:
- 0
- Uploads:
- 80
- Thanks:
- 73
- Thanked:
- 278 times in 256 posts
June 11, 2011 at 3:59 am #395810Hi Railer!
Please give us the login information FTP/Admin account to your support ticket KME-510-28075 in
http://support.joomlart.com. We’ll check for you.
Thanks.
TzuChi Foundation FriendTzuChi Foundation
- Join date:
- September 2014
- Posts:
- 39
- Downloads:
- 0
- Uploads:
- 12
- Thanks:
- 10
June 18, 2011 at 9:13 am #397098hi,
i am facing the same problem, could you please show here how to hide it only in homepage?
thanks
TzuChi Foundation FriendTzuChi Foundation
- Join date:
- September 2014
- Posts:
- 39
- Downloads:
- 0
- Uploads:
- 12
- Thanks:
- 10
June 22, 2011 at 3:30 am #397754hi hungnd,
thank you for your reply, but i get your mean “In template manager assign home page a new profile”,
could you show me where it is?thanks,
regards
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
June 23, 2011 at 9:49 am #398016Sorry mate, just forget that, I was confused Zeolite II with Jat3 template, here is the correct guide:
Open templatesja_zeolite_iilayoutsdefault.php, find this:
<?php $this->loadBlock('main') ?>
replace by:
<?php if( JRequest::getVar('view') != 'frontpage' ) : ?>
<?php $this->loadBlock('main') ?>
<?php endif; ?>
railer Friendrailer
- Join date:
- October 2007
- Posts:
- 236
- Downloads:
- 102
- Uploads:
- 9
- Thanks:
- 17
- Thanked:
- 24 times in 1 posts
July 18, 2011 at 9:55 pm #401724HI Hungnd,
Thanks for your response. Finally getting back to this issue…
Looks like what I was calling the “mainbody” is more that I thought because your fix above seems to include modules with it.
What I want to hide on the Frontpage is the block in which the content displays. In the JA Zeolite ii template it might be “ja-current-content.” I’m not sure.
It’s a rounded corner box. In the JA Zeolite ii demo, it might be the non-module block that contains the Frontpage article: “WinDVD 9 Plus”. (See attachment). I think that’s it. Please advise how to hide that on the Frontpage only.
Thanks,
railer
railer Friendrailer
- Join date:
- October 2007
- Posts:
- 236
- Downloads:
- 102
- Uploads:
- 9
- Thanks:
- 17
- Thanked:
- 24 times in 1 posts
July 18, 2011 at 10:26 pm #401725Okay, so I tried experimenting with the code you gave…
I opened layouts/blocks/main.php
Adding:
<?php if( JRequest::getVar('view') != 'frontpage' ) : ?>
Before this code before line 204:
<div id="ja-content" style="width:<?php echo $this->getColumnWidth('cw') ?>%">
And finishing the if statement at the end of that div at around line 253.
<?php endif; ?>
It worked to remove just the rounded box containing the Frontpage articles.
Now my problem is that in my site I actually have two Frontpages, one for the public and one for logged in Members.
The code hack hides it on both Frontpages.
How do I hide it on the Public Frontpage, but not on the Member Frontpage?
Maybe I could make it dependent on whether some custom module positions are published, or not? On the Public Frontpage I have three custom modules “Homeblock1”, “Homeblock2”, and “Homeblock3”.
Please advise as to how to proceed.
Thanks,
railerrailer Friendrailer
- Join date:
- October 2007
- Posts:
- 236
- Downloads:
- 102
- Uploads:
- 9
- Thanks:
- 17
- Thanked:
- 24 times in 1 posts
July 18, 2011 at 11:08 pm #401726For what it’s worth, here is my attempt at a if/else statement. Feedback needed and welcomed!
Thanks,
railer<!-- START OF CONTENT BLOCK AREA -->
<?php if ( $this->countModules('homeblock1') ) {
if( JRequest::getVar('view') != 'frontpage' ) : ( ?>
<div id="ja-content" style="width:<?php echo $this->getColumnWidth('cw') ?>%">
<div id="ja-current-content" class="ja-rounded-box clearfix">
<?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">
<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 class="rounded-box ja-rounded-box-tl"></div>
<div class="rounded-box ja-rounded-box-tr"></div>
<div class="rounded-box ja-rounded-box-bl"></div>
<div class="rounded-box ja-rounded-box-br"></div>
</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 ) } else { ( ?>
<div id="ja-content" style="width:<?php echo $this->getColumnWidth('cw') ?>%">
<div id="ja-current-content" class="ja-rounded-box clearfix">
<?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">
<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 class="rounded-box ja-rounded-box-tl"></div>
<div class="rounded-box ja-rounded-box-tr"></div>
<div class="rounded-box ja-rounded-box-bl"></div>
<div class="rounded-box ja-rounded-box-br"></div>
</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 ;} ?>
<!-- END OF CONTENT BLOCK AREA -->
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
July 22, 2011 at 7:11 am #402463Hi railer,
Can that solve the issue? As I can see you check the content of rendered component to find out if the user has logged in. But I think you should use a more formal way to do this, check this link:
http://forum.joomla.org/viewtopic.php?p=1322825AuthorPostsViewing 9 posts - 1 through 9 (of 9 total)This topic contains 9 replies, has 4 voices, and was last updated by Ninja Lead 13 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
How to hide mainbody block on home page
Viewing 9 posts - 1 through 9 (of 9 total)