Toubkal,
Many thanks for this solution. I have spent a couple of days trying different things to get it to work the way I would like, but I have run into problems. In the quote below, you mention using two stylesheets.
toubkal wrote:
thedude wrote:
Thanks so much for the reply toubkal.
Here is another question and I am trying to make it very simple for myself. Would this chunck of code work putting two templates on one page?
Code:
<?php if ( $my->id) {?>
code for one template
<?php }
else {?>
code for the second template
<?php } ?>
Is it missing anything?
Thanks
Yes, you can do that. You may be able to use just 1 css stylesheet for both but if you wanted to use 2 diferent ones you can just place more (or all) of the template code within the IF / ELSE statement so that a different stylesheet is referenced for each situation.
I understood your directions to mean that I should put all the code for my second template in the appropriate area. I did so, and I get a combination of the two templates. The main header graphic from the first template remains while only some of the text of the second template shows.
I want to do what Wolfcreek describe in the following post:
wolfcreek wrote:
keliix06 wrote:
Couldn't you make the first page in the main menu the login component then just assign a minimal template to that menu item? Then just set all of your content to only be accessable by registered users?
That's usually how it's done, but this hack allows you to verify memberships/registered users by assigning a specific template to certain areas. It's also another way to force registration instead of just displaying "You have to be a registered user to access this page" or "You are not authorized to view this". Instead of a DENIED, you give them the alternative to register. I find it keeps surfers in house and empowers them to get to the information. It's allowed my site to increase in size, instead of deterring the visitor to just close the window or decide it's not worth it.
It's all a matter of how you want to approach things, and whether or not you feel it's necessary. For those of using Community Builder and some sort of Account payment system, it helps to drive sales, and/or develop mailing lists for future info and releases.
Just my opinion.
Wolf.
Part of my problem is that I don't know how to invoke the registration component. Your original solution invoked it because the user had requested it. I don't want to do that. When the page loads, if the user is already logged in because they set their logged in status to "forever", they go to the registered user's template (template 1), other wise they go to the much simpler template with the registration component invoked (template 2) and the login at the bottom of the page in case a registered user logged out they can log back in..
Does this description make sense? I would greatly appreciate some help with this if you can find the time. FYI, the two templates I am using are js_nova from JoomlaShack (the most simple template I could fined.) and rhuk_solarflare_ii which comes with the Joomla installation package.
Hope to hear from you.
Jerry Nielsen