Section for logged-in users I've been asked to create a member's area in the site I am currently constructing.

This area should be accessible via a menu section that should only appear to logged in users.

Furthermore, if the user's role is a specific one, the menu should have one extra entry in which the user (let's say he is a baker, and the site is about a pastry shop), can see his earnings in a calendar like mode, assuming each of the cakes sold give's him a percentage.

So all in all, we have very conditional menu items. 

Furthermore, the /user page, if the user is logged in (if it's not it's just a themed version of the original Drupal /user page), should be a view, or Panel, or collection of View blocks, that should depict a summary of the 4 links that follow.

At the moment my /user page shows the default "History" and some other stuff some modules have added. How can this page be styled?

The other menu items are: Your Account, Your Cart, Wish List, Order History, pretty much self explanatory, and more or less accessible using Menu Tokens.

The menu's structure is something like this


  -You (if user is logged in should change to his first name)
  |-Your Account (should lead to a form just like user/register (already themed) where the user can edit his information)
  |-Your Cart (commerce cart - kinda easy)
  |-Wish List (commerce wishlist - easy too)
  |-Order History (commerce orders - easy too)
  |-Earnings (for 'Baker' role only)  


So the /user page should show (in a different fashion of course) all this information condensed.

So, to recap, the difficulties I am facing are:


Conditional name of the "You" item
Conditional appearing of the 4 sub-items
Conditional appearing ofthe 5th sub-item according to role
Theming of the /user page (when logged-in) (fixed using panel with UID as argument)


Any help for any of those would be highly appreciated.
You should check out Context module, can solve your needs listed above.

One way you can do is to create different menus for different roles.

For example, you create a menu called 'menu for anonymous' , add links for anonymous in the menu; create another menu called 'menu for member', add particular links in the menu. and so forth. 

With Context module, you can set 'menu for anonymous' to display for anonymous user; set 'menu for member' to display only for user has whatever role. 

For changing 'You' to username, I am thinking that you can use hook_block_view_alter, loop to all menu items in the menu block, replace 'you' to user's name. 

Again, with context module, you can add a section variable to the theme for the context of user logged in. 



then you can customize your template in page--user.tpl.php

if (!empty($section_title)):
        ... theming for logged in user  ...
else:
    ... theming for general ...  
endif;


Hope my answer make sense.