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

    Hi 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,
    railer

    thangnn1510 Friend
    #395810

    Hi 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 Friend
    #397098

    hi,

    i am facing the same problem, could you please show here how to hide it only in homepage?

    thanks

    TzuChi Foundation Friend
    #397754

    hi 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 Moderator
    #398016

    Sorry 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 Friend
    #401724

    HI 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


    1. ja-current-content
    railer Friend
    #401725

    Okay, 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,
    railer

    railer Friend
    #401726

    For 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 Moderator
    #402463

    Hi 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=1322825

Viewing 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