Joomla! Discussion Forums



It is currently Tue Nov 24, 2009 4:17 pm (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 14 posts ] 
Author Message
Posted: Tue Mar 28, 2006 2:01 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Mon Mar 13, 2006 10:14 pm
Posts: 314
Location: Philly
I want a snippet of text to appear on my homepage only. I had it working!


Text for homepage only


And then it mysteriously stopped working. I have no idea why. Anyone know?

This is my dev site  (not like it really matters for this issue) http://www.icestonetemp.com/new/

Thanks.

_________________
http://www.JoomlaSimple.com :: Home of the JoomlaSimple Administrator Handbook ::

It is hard enough to remember my opinions, without also remembering my reasons for them!

[Nietzsche]


Top
   
 
Posted: Tue Mar 28, 2006 2:28 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Sep 12, 2005 7:41 pm
Posts: 1374
Location: Glasgow - Scotland
Nice site Amanda ;)

You could just create a module and put the text in there and publish the module only on the front page :D

_________________
http://www.bulletprooftemplates.com/ - New Joomla 1.5 templates from an old Joomla head
If you don't know the answer don't be afraid to ask someone who does


Top
  E-mail  
 
Posted: Tue Mar 28, 2006 4:01 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Mon Mar 13, 2006 10:14 pm
Posts: 314
Location: Philly
Thanks for the kudos.

I did add it to a module. I added the content to  mosMainBody() but (its actually an image) it needs to be totally flush left and mosMainBody() pulls in "contentpaneopen" classes which I cannot figure out how to manipulate. SO, hence my desire to say IF HOME INCLUDE ELSE IGNORE. But my PhP just ain't working.

So any thoughts?

_________________
http://www.JoomlaSimple.com :: Home of the JoomlaSimple Administrator Handbook ::

It is hard enough to remember my opinions, without also remembering my reasons for them!

[Nietzsche]


Top
   
 
Posted: Tue Mar 28, 2006 4:27 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 2:46 am
Posts: 777
Location: Washington State, USA
I'm confused... is it in a module now and you have that if statement around the mosLoadModules() tag? or it's not in a module and you load it before the mosMainBody() ?

_________________
New to Joomla? :) Make sure2 visit:
\_Anna's Joomla Tips - index.php/topic,5503.0.html


Top
   
 
Posted: Tue Mar 28, 2006 4:45 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Mon Mar 13, 2006 10:14 pm
Posts: 314
Location: Philly
Neither. To keep things simplest, I just want the IF HOME statement to wrap around the image right in the template. I am trying to avoid modules given the extra padding they seem to bring with them. Haaris was just suggesting adding it to a module because assigning modules to just display on the homepage is easy.

_________________
http://www.JoomlaSimple.com :: Home of the JoomlaSimple Administrator Handbook ::

It is hard enough to remember my opinions, without also remembering my reasons for them!

[Nietzsche]


Top
   
 
Posted: Tue Mar 28, 2006 5:06 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 2:46 am
Posts: 777
Location: Washington State, USA
Ok, so you just have it right in the template. Could you post your template index.php or at least the surrounding portion?

Hmmm, have you removed an image lately? Last time I looked, there was an image in the main content above "IceStone 2006 Palette" but now it's gone.....

_________________
New to Joomla? :) Make sure2 visit:
\_Anna's Joomla Tips - index.php/topic,5503.0.html


Top
   
 
Posted: Tue Mar 28, 2006 5:07 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 2:46 am
Posts: 777
Location: Washington State, USA
Ok, now I see. It's commented out now
Code:
<!--   <img src="http://www.icestonetemp.com/new/images/home_tabletop.jpg" alt="IceStone" border="0" />
                           <br><br> -->

_________________
New to Joomla? :) Make sure2 visit:
\_Anna's Joomla Tips - index.php/topic,5503.0.html


Top
   
 
Posted: Wed Mar 29, 2006 2:18 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Sun Sep 18, 2005 8:28 pm
Posts: 1222
Location: Scotland
The simplest way is to duplicate the template and assign one to the home menu item. This would be the one you want to add that extra text. Then the other template assigned to the rest of the other menu items. Since the templates are the same in styles, you can have the template pointing to the same CSS files so you don't need to edit two same files all the time when making changes.

hope that helps,

sunburst
 

--- EDITED ---

Same with the images, you can keep them in the same folder and have both template point the image url to it. This way only thing in  one template folder is the index.php and xml file and the main template holds all the necessary files needed ;)

_________________
Custom website design | blog | tutorials | Photography | Downloads
Freelance Web Designer/Developer: www.duvien.com


Last edited by Anonymous on Wed Mar 29, 2006 2:25 am, edited 1 time in total.

Top
  E-mail  
 
Posted: Wed Mar 29, 2006 2:23 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Mon Mar 13, 2006 10:14 pm
Posts: 314
Location: Philly
Thank you Sunburst once again for helping me. You're the best!

_________________
http://www.JoomlaSimple.com :: Home of the JoomlaSimple Administrator Handbook ::

It is hard enough to remember my opinions, without also remembering my reasons for them!

[Nietzsche]


Top
   
 
Posted: Wed Mar 29, 2006 3:02 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Sun Sep 18, 2005 8:28 pm
Posts: 1222
Location: Scotland
You're welcome. :)

Remember by doing this you can have your homepage looking any way you want it, including having menus with different links in them to other pages.

An example is a site i did which has a login module box in the center with an image align to the right and no menu. The problem was that when you sign in, that login box became a logout text right in the middle where my main content is. So the trick was to assign a different template so the logout can be place elsewhere, ie, to the top next to the logo after user has logged in.

Thanks,

sunburst

--- EDITED ---

REMOVED LINK TO DEMO SITE  (if  you want to see it, please PM me). thanks,

_________________
Custom website design | blog | tutorials | Photography | Downloads
Freelance Web Designer/Developer: www.duvien.com


Last edited by Anonymous on Wed Mar 29, 2006 4:36 am, edited 1 time in total.

Top
  E-mail  
 
Posted: Wed Mar 29, 2006 4:21 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Mon Mar 13, 2006 10:14 pm
Posts: 314
Location: Philly
Thanks Sunburst. I just spent 2 hours working on a second template. Problem is - I am using this 3rd party dropdown menu component called LX Menu Pro which I adore but its causing many problems error messages playing off 2 templates.

So ... I am just going to go bang my head against the wall. After about 6 hours of that, answers usually magically come to me.

These Joomla boards are awesome - I've gotten so much help here. I think I have to work this one out on my own. If only


      Text for homepage only
     


still worked for me - then I wouldn't have ANY issues. Not sure why that code isn't working on my page.

:P :P :P :P

_________________
http://www.JoomlaSimple.com :: Home of the JoomlaSimple Administrator Handbook ::

It is hard enough to remember my opinions, without also remembering my reasons for them!

[Nietzsche]


Top
   
 
Posted: Wed Mar 29, 2006 4:46 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Sun Sep 18, 2005 8:28 pm
Posts: 1222
Location: Scotland
That is strange, the code looks fine to me.

might try it out.

_________________
Custom website design | blog | tutorials | Photography | Downloads
Freelance Web Designer/Developer: www.duvien.com


Top
  E-mail  
 
Posted: Wed Mar 29, 2006 5:22 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Sun Sep 18, 2005 8:28 pm
Posts: 1222
Location: Scotland
amandamalia wrote:
Thanks Sunburst. I just spent 2 hours working on a second template. Problem is - I am using this 3rd party dropdown menu component called LX Menu Pro which I adore but its causing many problems error messages playing off 2 templates.

So ... I am just going to go bang my head against the wall. After about 6 hours of that, answers usually magically come to me.

These Joomla boards are awesome - I've gotten so much help here. I think I have to work this one out on my own. If only


      Text for homepage only
     


still worked for me - then I wouldn't have ANY issues. Not sure why that code isn't working on my page.

:P :P :P :P


Sorry no experience with LXMenu (never used it as i tend to stay away from dropdown menus, must you use it  :P )

Anyway, tested out your code and it works, same as this:

    echo ('Text for homepage only');
      } ?>

They work only when the frontpage is either the component frontpage or linked static content but fail to work if it's outputted as blogcategory. So i'm not sure if these have anythig to do with why the code isn't working.

_________________
Custom website design | blog | tutorials | Photography | Downloads
Freelance Web Designer/Developer: www.duvien.com


Top
  E-mail  
 
Posted: Fri Mar 31, 2006 4:53 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Sun Sep 18, 2005 8:28 pm
Posts: 1222
Location: Scotland
In addition, you could try this:

Code:
<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
if($option=="com_frontpage" || $option=="") {
include("templates/YourTemplate/front.php");
}else{
include("templates/YourTemplate/follow.php");
}
?>
</head>


Create 2 PHP-Template files with a different style in your Template folder.  The front.php is the first-Page and the follow.php is for the next Mambo-Sides. Taken from: http://mamboteam.com/index.php?option=c ... &Itemid=56

hope that helps,

Sunburst

_________________
Custom website design | blog | tutorials | Photography | Downloads
Freelance Web Designer/Developer: www.duvien.com


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group