cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] Common configuration/customization questions

graffiti
Champ in-the-making
Champ in-the-making
Hi all,

Please anwser these questions if you know the solution:

1. How to customize the Login page such that another locale/language <> English is choosen as the default one?

2. How to add custom links/buttons to the toolbar?

3. How to simplify the UI such that:

- No "Create" link if the current user doesnt have enough permission in the current space.

- No "Browse Spaces" list if there is no sub-space in the current space.

- No "Content items" list if there is no item in the current space.

4. How to redirect user to a specific space after successful logon ? I found a similar question at http://forums.alfresco.com/viewtopic.php?t=2252

5. How to sort content items in a space by "cm:modified" descending?

TIA,

-g
7 REPLIES 7

graffiti
Champ in-the-making
Champ in-the-making
Please help. It's urgent!

TIA,

-g

ribz33
Champ on-the-rise
Champ on-the-rise
Hi,

Question 1 and 2, take a look at
http://wiki.alfresco.com/wiki/Web_Client_Customisation_Guide

For question 3 i had already test some change on webclient but i never success i had post quesion on forum and im waiting again an answer
http://forums.alfresco.com/viewtopic.php?t=2227

For question 4 there is no problem about it

And question 5 i dont know Smiley Very Happy

cya

graffiti
Champ in-the-making
Champ in-the-making
Hi all,

Please anwser these questions if you know the solution:

1. How to customize the Login page such that another locale/language <> English is choosen as the default one?

2. How to add custom links/buttons to the toolbar?

3. How to simplify the UI such that:

- No "Create" link if the current user doesnt have enough permission in the current space.

- No "Browse Spaces" list if there is no sub-space in the current space.

- No "Content items" list if there is no item in the current space.

4. How to redirect user to a specific space after successful logon ? I found a similar question at http://forums.alfresco.com/viewtopic.php?t=2252

5. How to sort content items in a space by "cm:modified" descending?

TIA,

-g

I found some answers myself:

3. UI simplifying:

a) Open /jsp/browse/browse.jsp and find

<td style="padding-left:4px" align=right>
<%– Quick upload action –%>
<nobr>
<r:permissionEvaluator value="#{NavigationBean.currentNode}" allow="CreateChildren" id="eval2">
<a:actionLink value="#{msg.add_content}" image="/images/icons/add.gif" padding="2" action="addContent" actionListener="#{AddContentDialog.start}" style="white-space:nowrap" id="link3" />
</r:permissionEvaluator>
</nobr>
</td>
<td style="padding-left:4px" width=52>
<%– Create actions menu –%>
<a:menu id="createMenu" itemSpacing="4" label="#{msg.create_options}" image="/images/icons/menu.gif" menuStyleClass="moreActionsMenu" style="white-space:nowrap">
<r:actions id="acts_create" value="browse_create_menu" context="#{NavigationBean.currentNode}" />
</a:menu>
</td>


then replace it with:

<r:permissionEvaluator value="#{NavigationBean.currentNode}" allow="CreateChildren" id="eval2">
<td style="padding-left:4px" align=right>
<%– Quick upload action –%>
<nobr>
<a:actionLink value="#{msg.add_content}" image="/images/icons/add.gif" padding="2" action="addContent" actionListener="#{AddContentDialog.start}" style="white-space:nowrap" id="link3" /> </nobr>
</td>
<td style="padding-left:4px" width=52>
<%– Create actions menu –%>
<a:menu id="createMenu" itemSpacing="4" label="#{msg.create_options}" image="/images/icons/menu.gif" menuStyleClass="moreActionsMenu" style="white-space:nowrap"> <r:actions id="acts_create" value="browse_create_menu" context="#{NavigationBean.currentNode}" />
</a:menu>
</td>
</r:permissionEvaluator>

For b) and c), I tried to wrap the "Browse spaces" panel by something like:

<a:booleanEvaluator value="#{BrowserBean.nodes != null}">
…..
</a:booleanEvaluator>

but it didnt work. Do you guys know which evaluator and its value/condition I should use? Or should I write my own evaluator? How about implement a new viewMode?

4. I follow the instruction from http://forums.alfresco.com/viewtopic.php?t=2252 and my /jsp/extension/home.jsp is something like

<%
response.sendRedirect(request.getContextPath() + "/navigate/browse/workspace/SpacesStore/0b28fa40-0812-11db-bc50-25bfd78cd925");
%>
You must replace the node id of course.

5. I think this can be solved by implementing a custom viewMode. I'll try and report later.

Happy alfresco hacking!

-g

graffiti
Champ in-the-making
Champ in-the-making
5. How to sort content items in a space by "cm:modified" descending?

Haha, there's no need to implement a custom view cause Alfresco already allows us to config the sorting column. Your <extension>/web-client-config-custom.xml should contain something like below:

<config evaluator="string-compare" condition="Views">
   <views>
      <view-defaults>
         <browse>
            <sort-column>modified</sort-column>
         </browse>
      </view-defaults>
   </views>
</config>

HTH,

-g

graffiti
Champ in-the-making
Champ in-the-making
1. How to customize the Login page such that another locale/language <> English is choosen as the default one?

I think this can be solved by overide the LoginBean. I'll try and tell the result later.

3. How to simplify the UI such that:

- No "Browse Spaces" list if there is no sub-space in the current space.

- No "Content items" list if there is no item in the current space.

I still dont know how to achieve this. Please help.

TIA,

-g

lars
Champ in-the-making
Champ in-the-making

4. I follow the instruction from http://forums.alfresco.com/viewtopic.php?t=2252 and my /jsp/extension/home.jsp is something like

<%
response.sendRedirect(request.getContextPath() + "/navigate/browse/workspace/SpacesStore/0b28fa40-0812-11db-bc50-25bfd78cd925");
%>
You must replace the node id of course.

-g

The proposed solution for 4. seems to work well (thank you, graffiti), besides the case if you like to redirect to the "Company Home" space. In this case the user ends up in his home space, any help?

Thank you and happy hacking  :wink:

Lars

lars
Champ in-the-making
Champ in-the-making
It should be added that – if guest login is disabled – the index.jsp file in the alfresco root directory needs to be modified as follows, in order to make it work for the first login:
response.sendRedirect(request.getContextPath() + faces/jsp/login.jsp
if the user is accessing the application via http://yourserver/alfresco/
which might be the most common scenario

Lars