NOTICE: RocketTheme will be releasing templates for Joomla! 1.5 only starting January 2009. Read the thread…
RocketTheme  |  General  |  Free/GPL/Tutorials Discussions  |  Topic: Excluding code/scripts from pages « previous next »
Pages: 1 [2] 3 Go Down Print
Author Topic: Excluding code/scripts from pages  (Read 29699 times)
Anastasia Kiryanova
Newbie
*
Offline Offline

Posts: 8


Re: Excluding code/scripts from pages
« Reply #15 on: July 10, 2008, 05:21:40 AM »

Sorry James, did not understand exactly waht you mean. I have no spaces on all other pages than on the frontpage. Mainbody has for sure no content now but I still see an empty white area on frontpage, looking like a banner or a small empty menu bar.

Anastasia

Logged
James S!
Muffin Man
RocketTheme
Hero Rocketteer
*
Online Online

Posts: 40456


Firebug...Firebug...Firebug!

WWW
Re: Excluding code/scripts from pages
« Reply #16 on: July 11, 2008, 02:28:34 AM »

Could you please provide a link to your site, and if applicable, a direct URL to the issue?
Logged

Firebug Video Tuts: - Editing HTML - Javascript Errors - Logo Changes

Video tutorials on how to use Firebug, its what we use Smiley
KeenEye Design
Newbie
*
Offline Offline

Posts: 19

Re: Excluding code/scripts from pages
« Reply #17 on: July 17, 2008, 09:31:28 AM »

You'd use

<?php if ($Itemid != "39") : ?>

How would I add more than one page/article to this code?  If I wanted my content to be omitted on several pages and not just one?
Logged
James S!
Muffin Man
RocketTheme
Hero Rocketteer
*
Online Online

Posts: 40456


Firebug...Firebug...Firebug!

WWW
Re: Excluding code/scripts from pages
« Reply #18 on: July 17, 2008, 09:37:15 AM »

Something like

<?php if ($Itemid != "39" or $Itemid != "44") : ?>
Logged

Firebug Video Tuts: - Editing HTML - Javascript Errors - Logo Changes

Video tutorials on how to use Firebug, its what we use Smiley
Caltucker
Sr. Rocketeer
****
Offline Offline

Posts: 159


Re: Excluding code/scripts from pages
« Reply #19 on: August 27, 2008, 11:56:17 AM »

How do you exclude the object from everything BUT the frontpage? In other words, I want the rocket image ONLY to appear on the homepage. In my case the homepage is Itemid 1 (not the frontpage component).
The following code does the opposite:
Code:
<?php if ($Itemid != "1") : ?>
<a href="http://www.allieandbri.com/" title="Allie and Bri Photography" class="nounder">
<img src="<?php echo $this->baseurl;?>/templates/<?php echo $this->template?>
/images/blank.gif" border="0" alt="Allie and Bri Photography" id="rocket" /></a>
                <?php endif; ?>

In other words, the rocket image is on every page BUT the homepage - exactly opposite of what I want

If I take out the exclamation point from the php code, then the rocket images again appears on every page
« Last Edit: August 27, 2008, 12:08:54 PM by Caltucker » Logged
James S!
Muffin Man
RocketTheme
Hero Rocketteer
*
Online Online

Posts: 40456


Firebug...Firebug...Firebug!

WWW
Re: Excluding code/scripts from pages
« Reply #20 on: August 28, 2008, 03:42:39 AM »

You'd use

<?php if ($Itemid=="1") : ?>
Logged

Firebug Video Tuts: - Editing HTML - Javascript Errors - Logo Changes

Video tutorials on how to use Firebug, its what we use Smiley
Dale M Pombrio
Newbie
*
Offline Offline

Posts: 9

Re: Excluding code/scripts from pages
« Reply #21 on: September 02, 2008, 06:30:36 AM »

i'm trying to disable mainbody on the frontpage, but where do I put this code in index.php?

<?php if ($option != "com_frontpage") : ?>
       <?php mosMainbody(); ?>
<?php endif; ?>

-edit- ok I got it in the right place.  but there is still the "Home" section showing.  how do I get rid of this?
« Last Edit: September 02, 2008, 12:42:48 PM by Dale M Pombrio » Logged
James S!
Muffin Man
RocketTheme
Hero Rocketteer
*
Online Online

Posts: 40456


Firebug...Firebug...Firebug!

WWW
Re: Excluding code/scripts from pages
« Reply #22 on: September 03, 2008, 03:03:38 AM »

Please elaborate on "Home Section"?
Logged

Firebug Video Tuts: - Editing HTML - Javascript Errors - Logo Changes

Video tutorials on how to use Firebug, its what we use Smiley
Dale M Pombrio
Newbie
*
Offline Offline

Posts: 9

Re: Excluding code/scripts from pages
« Reply #23 on: September 03, 2008, 10:16:49 AM »

http://www.mattjolsen.com/joomla12345/

there's still a module there that just says "Home".  before, it said "Home" and "There is no content to display"
Logged
Mike VanKirk
Support
RocketTheme
Hero Rocketteer
*
Offline Offline

Posts: 8261


WWW
Re: Excluding code/scripts from pages
« Reply #24 on: September 03, 2008, 07:11:05 PM »

Hello,

That looks like the pathway.  You can turn it off in the template's index.php parameters.
Logged

Dale M Pombrio
Newbie
*
Offline Offline

Posts: 9

Re: Excluding code/scripts from pages
« Reply #25 on: September 04, 2008, 07:46:03 AM »

yea that worked...but...that sucks.  the pathway is very useful on the other parts of the site.  do I have any other options here?
Logged
monburkina
Sr. Rocketeer
****
Offline Offline

Posts: 122

Re: Excluding code/scripts from pages
« Reply #26 on: September 12, 2008, 04:28:09 PM »

James,

I am using Joomla 1.0.15 and tried adding these codes but that did not help:  The box is still there- I tied changing templates to no avail.

<?php if ($option!="com_frontpage") : ?>
<?php mosMainbody(); ?>
<?php endif; ?>
Logged
James S!
Muffin Man
RocketTheme
Hero Rocketteer
*
Online Online

Posts: 40456


Firebug...Firebug...Firebug!

WWW
Re: Excluding code/scripts from pages
« Reply #27 on: September 13, 2008, 07:42:57 AM »

It depends on the template, some templates have more code areas for the mainbody such as the component DIVs in Populus. In that case, you need to move the IF and ENDIF code to higher levels in the code.
Logged

Firebug Video Tuts: - Editing HTML - Javascript Errors - Logo Changes

Video tutorials on how to use Firebug, its what we use Smiley
monburkina
Sr. Rocketeer
****
Offline Offline

Posts: 122

Re: Excluding code/scripts from pages
« Reply #28 on: September 13, 2008, 09:16:01 AM »

James,

I sent you an e-mail. It still does not work. Maybe I doing something wrong-

Many thanks for your support
Logged
James S!
Muffin Man
RocketTheme
Hero Rocketteer
*
Online Online

Posts: 40456


Firebug...Firebug...Firebug!

WWW
Re: Excluding code/scripts from pages
« Reply #29 on: September 14, 2008, 06:31:07 AM »

Well, you've just added

Code:
     <?php if ($option!="com_frontpage") : ?>
       <?php mosMainbody(); ?>
       <?php endif; ?>

That is not what you do. You are suppose to modify the instance of <?php mosMainbody(); ?> to the above code.

For Populus, change

Code:
                           <div id="component-top"><div><div></div></div></div>
                           <div id="component"><div class="left"><div class="right">
                              <div id="component-size">
                                 <?php mosMainbody(); ?>
                              </div>
                           </div></div></div>
                           <div id="component-bottom"><div><div></div></div></div>

To

Code:
<?php if ($option!="com_frontpage") : ?>
<div id="component-top"><div><div></div></div></div>
                           <div id="component"><div class="left"><div class="right">
                              <div id="component-size">
                                 <?php mosMainbody(); ?>
                              </div>
                           </div></div></div>
                           <div id="component-bottom"><div><div></div></div></div><?php endif; ?>
Logged

Firebug Video Tuts: - Editing HTML - Javascript Errors - Logo Changes

Video tutorials on how to use Firebug, its what we use Smiley
Pages: 1 [2] 3 Go Up Print 
RocketTheme  |  General  |  Free/GPL/Tutorials Discussions  |  Topic: Excluding code/scripts from pages « previous next »
Jump to:  

viagra professional