cancel
Showing results for 
Search instead for 
Did you mean: 

AMP file with custom login page

jeffandcarrie
Champ in-the-making
Champ in-the-making
Hi

I followed the tutorial in the documentation to create a custom login page and it worked fine.   However, when i deploy it as part of an amp file i need to modify  the surf.xml to reference it as the default login page type.    How do I deploy the custom login via an AMP file?

Thanks

/Jeff



Link to the totorial
http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Ftasks%2Ftutorial-share...
5 REPLIES 5

ddraper
World-Class Innovator
World-Class Innovator
You don't necessarily have to override the surf.xml file - you can include the same code in the share-config-custom.xml file. That should work with an AMP deployment - I think this is what the documentation states. Your share-config-custom.xml should "win" over the surf.xml configuration.

Regards,
Dave

jeffandcarrie
Champ in-the-making
Champ in-the-making
Dave thanks for your reply

my share-config-custom.xml has the xml below.   However I still get the same login page.   I am able to change the default in surf.xml and see my login page so I assume i have the other parts done correctly.  


<alfresco-config>
   <config evaluator="string-compare" condition="WebFramework">
      <web-framework>
         <defaults>
            <page-type >
               <id>login</id>
               <page-instance-id>wmc-login</page-instance-id>
            </page-type>
         </defaults>
      </web-framework>
   </config>
</alfresco-config>

ddraper
World-Class Innovator
World-Class Innovator
It's possible that the problem is in the way that the ConfigService processes nested configuration elements (it doesn't perform an augmentation of XML to any kind of depth). This means that the actual configuration passed to the application will have multiple entries of the same element and it could be that yours is not the one getting picked up. You could try adding the replace="true" attribute to your <config> element. However, if you do this you'll need to copy in all the other settings from that <defaults> element.

Please note: I haven't done any in-depth analysis of your specific problem, this is based on my understanding of the ConfigService implementation and it could be that just duplicating the rest of the <defaults> element is not enough, however - it's probably worth trying out to see if it works.

Regards,
Dave

jeffandcarrie
Champ in-the-making
Champ in-the-making
Thanks …   I could not get that to work within the module.   I deployed the share-config-custom.xml separately to shared\classes\alfresco\web-extension and it works fine.   I'll just leave it at that.

I need to place an image on the custom login page. The image is referred using <img src="logo.pjg"/> in the custom login.ftl. But the image is not getting displayed.

Do you know where to place the image? I have placed the template under Shared/classes/alfresco/templates/agency/login.ftl