cancel
Showing results for 
Search instead for 
Did you mean: 

Custom navigation, incorrect link

bengrah
Champ on-the-rise
Champ on-the-rise
Hi all

One of our requirements is when the user logs in to Alfresco Explorer, the next page they see is their own User Space. Now to do this, I override one of the <navigation-rule> tags in faces-config-custon.xml with the following markup:

    <navigation-rule>
      <description>
         The decision rule used by the NavigationHandler to
         determine which view must be displayed after the
         current view, login.jsp is processed.
      </description>
      <from-view-id>/jsp/login.jsp</from-view-id>
      <navigation-case>
         <description>
             Indicates to the NavigationHandler that the browse.jsp
             view must be displayed if the Action referenced by a
             UICommand component on the login.jsp view returns
             the outcome "success".
         </description>
         <from-outcome>success</from-outcome>
         <to-view-id>/jsp/browse/browse.jsp</to-view-id>
      </navigation-case>
     
       <navigation-case>
         <description>
             Indicates to the NavigationHandler that the browse.jsp
             view must be displayed if the Action referenced by a
             UICommand component on the login.jsp view returns
             the outcome "success".
         </description>
         <from-outcome>myalfresco</from-outcome>
         <to-view-id>/jsp/browse/browse.jsp</to-view-id>
      </navigation-case>
   </navigation-rule>

After restarting Alfresco this works, with the user automatically going to their own space when logging in. However, the My Alfresco link in the left hand navibar is still highlighted as if the current page we're on is My Alfresco and not My Home. Anyone have any idea if I can / where I can change this?
1 REPLY 1

bengrah
Champ on-the-rise
Champ on-the-rise
Found a solution to this. web-config-client.xml has a tag called <initial-location> that has 4 values that can be used within it, so if you use

<initial-location>userhome</initial-location>

In your web-client-config-custom.xml file (surrounded by <config><client>..</client></config> tags) then the location that the user will get to after they log in will navigate to User Home.

However this presents another problem, which is when you log in with the above config in place, you get the User Home screen, however if you log out and log back in again (without closing the browser window) then you'll be taken to My Alfresco (or your dashboard screen if you prefer) instead. So I think the <initial-location> only lasts once per session though I can't really confirm this.

Apologies for bumping up such an old topic, but I see a lot of topics on the board that haven't been followed up on. So I thought I'd just try and turn that around a bit