Tip: Using 2 Templates

A forum with Tips, tricks and small tutorials.

Moderators: mcsmom, unixboymd

Forum rules
Post Reply
masoesa
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Sep 26, 2005 7:11 pm

Tip: Using 2 Templates

Post by masoesa » Wed Jan 09, 2008 3:29 am

When you want to use one template for the front page and a different one to show the content you can use {mosloadposition user1} to load your component in the body: .

User avatar
webwannabee
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Aug 26, 2005 6:24 pm
Location: Canada...by a big lake..up 'north'

Re: Tip: Using 2 Templates

Post by webwannabee » Wed Jan 09, 2008 6:39 am

Thanks for the tip Masoesa, I've been wondering how to do this for ages. ??? The 'loadpostion userx' is great stuff, I was just told how load a module in the content area with it and...it worked! However, I'm wondering if you wouldn't mind elaborating a little, more specific details as to how you would do this? (I'm still a little 'noobish', even after being on here a while :-  So I have this other template, the one I want to use for pagesother than frontpage...and it's there in the backend with the other templates, and assigned to all the pages BUT the frontpage obviously.  And I have the index.php, where it says '.
Where do I type in the 'mosloadposition user1'..and what if something else is using that particular postion, like the banner or something.. please excuse my ignorance
"Seek and ye shall find..OK not too original, but sooo true of this forum!!

masoesa
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Sep 26, 2005 7:11 pm

Re: Tip: Using 2 Templates

Post by masoesa » Wed Jan 09, 2008 7:00 am

I understand, it's not easy to explain out of the blue so just let me know if it's clear.

The tag is {mosloadposition user1}

mosloadposition is to load a component and "user" is the position of component/module.

You have to create a content page with the nowyswyg editor and add this tag {mosloadposition user?}.
Then you publish this page in the front page.

Take a look at http://going-natural.com. The large part of sliding pictures is a content page calling a the component to show the slides.

User avatar
webwannabee
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Aug 26, 2005 6:24 pm
Location: Canada...by a big lake..up 'north'

Re: Tip: Using 2 Templates

Post by webwannabee » Wed Jan 09, 2008 11:54 pm

Well, I am going to try and  do what I think you are saying to do, and we'll see if it works.  If not don't worry I will be baaaxcckk
lol  By the way, you have a great site there, the layout, colours, navigation.  I think I see where you mean that, when you click on a content item (like read more) how it goes to a different layout (hence, different template).  Yes, that's what I'd like to try and do  :)
"Seek and ye shall find..OK not too original, but sooo true of this forum!!

masoesa
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Sep 26, 2005 7:11 pm

Re: Tip: Using 2 Templates

Post by masoesa » Thu Jan 10, 2008 1:36 am

webwannabee wrote:Well, I am going to try and  do what I think you are saying to do, and we'll see if it works.  If not don't worry I will be baaaxcckk
lol  By the way, you have a great site there, the layout, colours, navigation.  I think I see where you mean that, when you click on a content item (like read more) how it goes to a different layout (hence, different template).  Yes, that's what I'd like to try and do  :)


Thanks, I like my site but I still have a few things to work on. The drop down menu for instance. Somehow it doesn't work. so if you have any tips on that please let me know.

Anyway. The read more link only works if you have the tag main body in the template. So I needed to add this tag to the first template to make it work.

If you look closely you will see the difference:

Template 1 (notice the center menu): http://going-natural.com/index.php?opti ... d&Itemid=1
Template 2 (notice no center menu): http://going-natural.com/index.php?opti ... 6&Itemid=2

User avatar
webwannabee
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Aug 26, 2005 6:24 pm
Location: Canada...by a big lake..up 'north'

Re: Tip: Using 2 Templates

Post by webwannabee » Thu Jan 10, 2008 5:02 am

Yes I did notice the lack of the center menu, figuring that was due to another template.
"The read more link only works if you have the tag main body in the template. So I needed to add this tag to the first template to make it work. " Would you mind showing me how/where you added this to the template? I think you're miles ahead of me in the coding department :D, don't know if I can do  this right now, but definately going to keep this neat tip in mind for when things are clearer to me. And here I was hoping it would be easy  :laugh: Cheers masoesa.
Karen
"Seek and ye shall find..OK not too original, but sooo true of this forum!!

masoesa
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Sep 26, 2005 7:11 pm

Re: Tip: Using 2 Templates

Post by masoesa » Fri Jan 11, 2008 1:51 am

I may have confused you. Every template automatically has this main body tag. You can use the load position in an article. Choose the position where you want the mod to show. So you choose the position yourself whether it's user1 or banner10.

Maybe this confuses you even more. If it does please send the link of your site and tell me what you are trying to do. Maybe I can explain it to you better.

You flatter me but I have to be honest and I really don't know much about coding. I am good in workaournds.

User avatar
webwannabee
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Aug 26, 2005 6:24 pm
Location: Canada...by a big lake..up 'north'

Re: Tip: Using 2 Templates

Post by webwannabee » Fri Jan 11, 2008 2:22 am

Unfortuneately I don't have a site up at the moment (I did but not now ). You probably explained it as well as can be- it's up to me now for it to sink in.  If it doesn't well there is always the JoomlaPages extension, although I can't seem to get THAT to install right now either (maybe it's not compatible with 1.5).  Anyway thanks for all the help masoesa  :)
"Seek and ye shall find..OK not too original, but sooo true of this forum!!


Post Reply