By mrchips on
We have figured out how to set a static page as the default node, and figured out how to detect if the user has logged in or not. But we have not been able to figure out how to load a node, for example forums, from a static page. We suspect it's relatively trivial but we're stuck. Can anyone point us in the right direction?
1) If the user is not logged in display an introduction static-page.
2) if the user is logged in have the static-page display the forums.
global $user;
if ($user->uid)
{
[load the forums]
}
else
{
[intro]
}
Comments
Here's a suggestion
Using your logic above, one could perhaps do the following:
if ($user->uid)
{
header("Location: http://www.yoursite.com/forum");
}
else
{
header("Location: http://www.yoursite.com/node/view/idofintronode
}
I hope that helps in any way,
Robert Sparks