Hello,
I need to create a site with two different parts. When the user enters the site, he or she needs to select which part to go to ('students' or 'clients'). Once selected, there's no need to switch between the parts.
The students-part uses a lot of the blogging features of Drupal; the clients-part contains a few informative pages (maybe published using the book module) and a contact form.
I would like to power both parts with one drupal installation (because they both use the same template, and because it's easy for the site editors). However, how would I do such a thing? My main concern is the navigation; when looking a the 'students' part, I don't want to reveal the 'clients' navigation and vice versa..
Comments
Any thoughts on how to do
Any thoughts on how to do this?
possible..
HI Eyos,
I think I know what you mean...can I recommend you try the following as starting points:
Sections.module (allows you to have different themed sections within the one site)
organic groups module (useful for working with groups within communities)
multiple sites with single Drupal install. (does exactly what it says on the tin)
Recommend you also check out Drupal's USER ROLES functions..Which allows you to simply control which users see what or what they can do, within the same site... and automatically direct them to their section when they login. e.g. you set up a CLIENT user role and a STUDENT user role..and when a client visits the site, they see totally different options to the Student (which is easily controlled using ACCESS CONTROL or the various modules available with Drupal)
I hope that helps as a pointer..it's hard to give you a definitive answer..Drupal can handle what you want to do..there are just a number of ways of doing it.
dub
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
Sections not for 4.6
Hello Dub,
The sections module is probably exactly what I need. However, there's currently no release for Drupal 4.6, and there will never be one. However, Bèr (the author) e-mailed me that a 4.7 release is under development.
Clients won't be login in, so the organic groups module might not be helping out here.
I will have a look at the multisite module, but it seems a bit overkill to use a multisite setup just to hide parts of the navigation in the template.
Would it be possible to hide or show certain content or blocks in the template (that would be the navigation part) based on the user's current path? That way, I could show certain menu information when the users is in ./student/* or in ./client/* ?? Any thoughts on that?
Thanks,
Eyos.
yeah..it's fairly simple..
If you just use a single installation and setup a seperate ROLE for each type of user, e.g. CLIENT and STUDENT, you can control who sees which content very simply. you can also allow CLIENTS to do something, but, not Students.
Setting up different USER ROLES
If you go to ADMINISTER -->> ACCESS CONTROL and click on the ROLES tab, you should see an option to add a new role. Just type STUDENT and click on the ADD ROLE button.
Once that is done..you can click on the ADMINISTER -->> ACCESS CONTROL and PERMISSIONS tab to control what a STUDENT can do.
Similarly, you can control which blocks appear depending on USER ROLE by using the snippet to only displaying block content specific to a user..
That's obviously just the tip of the iceberg in terms of control..but it should get you started.
Dub
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
Thanks again for you tips.
Thanks again for you tips. But, I'm afraid your solutions isn't going to work, since both clients and students won't be logging into the site (they don't get to have an account). So I need to distinct the two on the first page (index.htm, or by using the frontpage module), and on that page the visistor needs to select to which part he wants to go (student or client area).
Is it possible to have the
Is it possible to have the current path, for example (index.php?q=)/clients/contactpage, available in page.tpl.php (I'm using PHPTemplate)? This way, I could filter the clients part out of the URL and show different things...
replied too quickly..
Sorry..I replied too quickly. didn't spot the non-login thing.
yes you can specify things based on the path...although I haven't tried it extensively and like the way you want to use it though..
here's an example:
As I understand it..the first line
(arg(0) == 'student')means if the path iswww.example.com/studentdo what comes next. If the path is not equal to student, ignore and do whatever comes up next.If you go to CREATE CONTENT -->> PAGE and paste the above into the main BODY, select the PHP FILTER
you can use the same code for a block. i.e. if you go to ADMINISTER -->>BLOCKS and ADD BLOCK. Paste the above in, select the PHP filter, you can control what student sees or not.
hope that helps get you started. I'm not sure how simple that will be to maintain if you want to get into more detailed stuff..but, it might help nudge you in the right direction.
Dub
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
arg() returns non-clean URL
Thanks for the help again. I think using if statements with arg() would be perfect. However, I've been playing with it a little, and it seems that arg(1), arg(2), etc only contain Drupal's internal non-clean URL, e.g. /node/11 instead of /students/welcome (http://drupal.org/node/37967). Is there a way to fetch the 'cleaned' URL parts?
Ehm..
Any idea on this guys?