Joomla! Discussion Forums



It is currently Mon Nov 23, 2009 1:39 pm (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 9 posts ] 
Author Message
Posted: Thu Jul 27, 2006 5:27 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 5759
Location: New York
I have what is for me a complicated project in which I have two different templates on the same joomla installation. I want people who come to the site via a redirect from subdomain1.mysite.org to always see one template and people who come from subdomain2.mysite.org to always see the other template. 

I've done pretty well, but I have some places where I could not figure out how to get the right template because there was not a fixed menu link. In particular, I am using the great/torturous lmtg_myhomepage which creates a separate link for each user using $my.  Usually, you either access the page through the myhomepage menu module (which isn't really a joomla menu, it is just an ordered list of the users pages) or through a link in content using moslate. That is to say, no real menu link. So then my problem is: how can I assign the template to these pages?

i realized that the problem (or at least one problem) is no itemid. So, after struggling with it for a while, I came up with making the link (a url link and/or a link in a content page) and putting an itemid from a page with the right template at the end. It works--but this can't possibly be a good idea, can it?

_________________
Read your words before posting and think about how other people will read them.
Be polite. Be kind. Be constructive. Say thank you.
Freedom-Equality-Trust-Community-Collaboration-Usability
http://opensourcematters.org/index.php?Itemid=134


Top
   
 
Posted: Sat Jul 29, 2006 9:31 pm 
That is complicated. I have been messing around with it myself.

The one thing I wish we could do is have either domain redirect to it's own file, which then would redirect to a Joomla! page and establish a menubar of its own that has the "custom" home page.

The only trouble is that shared pages (most of your website) will not know which menu to use (with it's own home page and its own ItemID, therefore, it could have its own template.) I keep rolling that around -- and wonder if a little, tiny hack in the module area might be okay. (I do not believe in hacks. This would honestly be a first. I don't like them.)

+++

Otherwise, I am not familiar with these tools but, the process you are describing makes sense to me. And, I can't think of a better one. I am going to keep thinking about my idea above, but I wanted you to know that I have not ignored this. But, rather, you stuck it into my mind, now it won't leave! lol ... So, I'll come back, later, too. < The honor of answering a question for MCSMom is too great to pass up, trust me. She has always been my Joomla! hero since I started! >

TTYL....Thanks! Amy


Top
   
 
Posted: Sun Jul 30, 2006 12:47 am 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 5759
Location: New York
The thing is, how do I conceptualize myhomepage? Are they each separate pages? Or is it one page with content that varies? And how do I generate an itemid without hard coding a menu item for each and every person, which defeats the beauty of having it dynamically generated.

It works to do what I said, but it feels wrong.

_________________
Read your words before posting and think about how other people will read them.
Be polite. Be kind. Be constructive. Say thank you.
Freedom-Equality-Trust-Community-Collaboration-Usability
http://opensourcematters.org/index.php?Itemid=134


Top
   
 
Posted: Sun Jul 30, 2006 1:26 am 
I think the trick is knowing what the original referrer was -- which sudomain subdomain1 or subdomain2 did you come from.

If that information was known THE ENTIRE TIME the visitor was on your site, I was conceptualizing a different home menu item for each subdomain. That menu item would produce the appropriate home page.

However! We do not have a session variable that would tell us the referrer (i.e., subdomain1 or 2); further, we have no ability to map menu items based on a session variable which might hold that value.

These ideas would require hacks to the code - which I do not ever think is a good idea - and MUCH more thought on the ramifications of not having ItemID = 1 for each home page (ex. breadcrumbs will be impacted).

++++

How many people are we talking about here?

Edit: How could the template chooser be used to aid in this? How are they going to sign-up?


Last edited by AmyStephen on Sun Jul 30, 2006 1:28 am, edited 1 time in total.

Top
   
 
Posted: Sun Jul 30, 2006 10:25 am 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 5759
Location: New York
Playing around with template chooser is an interesting idea.

You are right about the session variable.

_________________
Read your words before posting and think about how other people will read them.
Be polite. Be kind. Be constructive. Say thank you.
Freedom-Equality-Trust-Community-Collaboration-Usability
http://opensourcematters.org/index.php?Itemid=134


Top
   
 
Posted: Sun Jul 30, 2006 10:28 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Nov 10, 2005 3:10 am
Posts: 1919
Location: New Jersey, USA
Simple... Make two different codebases (one for each subdomain) pointing to the same db... then just edit index.php and index2.php so the template is hard coded into it (instead of getting default from db)...

_________________
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs


Top
   
 
Posted: Sun Jul 30, 2006 10:35 am 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 5759
Location: New York
Yes, you could do that, but it creates certain other problems, notably two people could be editing the same content at the same time.

_________________
Read your words before posting and think about how other people will read them.
Be polite. Be kind. Be constructive. Say thank you.
Freedom-Equality-Trust-Community-Collaboration-Usability
http://opensourcematters.org/index.php?Itemid=134


Top
   
 
Posted: Sun Jul 30, 2006 12:10 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Nov 10, 2005 3:10 am
Posts: 1919
Location: New Jersey, USA
mcsmom wrote:
Yes, you could do that, but it creates certain other problems, notably two people could be editing the same content at the same time.
Nope, as content locking is done from the database side.  The only problem that would arrise, is durring upgrades and component installation. 

An even better solution would be to simlink every directory, and every file in the root directory but index.php and index2.php from one subdomain to the other...  That way, in reality, you are only dealing with one codebase... WOW, this gives me an interesting idea!

_________________
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs


Top
   
 
Posted: Sun Jul 30, 2006 12:39 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 5759
Location: New York
Go for it!

_________________
Read your words before posting and think about how other people will read them.
Be polite. Be kind. Be constructive. Say thank you.
Freedom-Equality-Trust-Community-Collaboration-Usability
http://opensourcematters.org/index.php?Itemid=134


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

Quick reply

 



Who is online

Users browsing this forum: RobertMallett and 38 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