Thanks to Jonathan for giving us a hint that it works. Indeed, I added the 
name of the theme in prefix to the path in the clause "th:replace" and in 
the clause "href". 

The loginView.html file for my theme was used, but the inclusion of the 
loginform.html file was the default theme.


Le vendredi 27 janvier 2017 13:18:56 UTC-5, Jonathan Franzone a écrit :
>
> Ah! I've got it working for me now. The issue in my case was twofold:
>
> 1) I had an error in my layout file, which caused things to fall back to 
> the default theme
>
> 2) On all of my fragment includes, I needed to specify my theme.
>
> So instead of:
> <div threplace="fragments/loginform" />
>
>
> Put:
> <div threplace="ensam/fragments/loginform" />
>
>
> Hope that helps!
>
> On Monday, January 23, 2017 at 7:18:17 AM UTC-6, Matthieu Marc wrote:
>>
>> Hi,
>>
>> I am using CAS 5.0.2 and cas-maven-overlay.
>>
>> I am trying to create a custom theme named "ensam".
>>
>> In cas.properties, I added following lines in order to make my theme the 
>> default theme.
>>
>> cas.theme.paramName=theme
>> cas.theme.defaultThemeName=ensam
>>
>>
>> I create folder src/main/resources/templates/ensam and copied default 
>> views file in it. So that, I 
>> get src/main/resources/templates/ensam/casLoginView.html
>>
>> I changed this file.
>>
>> When I start CAS service (./build.sh run) and go to url /cas/login, I do 
>> not see my modification.
>>
>> In log, I got following :
>>
>> 2017-01-23 13:25:10,220 DEBUG [org.apereo.cas.services.web.
>> RegisteredServiceThemeBasedViewResolver] - <Found view ensam/casLoginView
>> >
>> 2017-01-23 13:25:10,265 DEBUG [org.apereo.cas.services.web.
>> ServiceThemeResolver] - <Found custom theme [ensam] for service [id=1000.
>> .....]
>>
>> In my cas-overlay-template directory, I can find the file in theses 
>> places :
>>
>> find ./ -name casLoginView.html
>> ./src/main/resources/templates/ensam/casLoginView.html [my original file]
>> ./target/war/work/org.apereo.cas/cas-server-webapp/WEB-INF/classes/
>> templates/casLoginView.html  [file without my changed]
>> ./target/cas/WEB-INF/classes/templates/casLoginView.html [file from maven 
>> dependencies - without my changed]
>> ./target/cas/WEB-INF/classes/templates/ensam/casLoginView.html [my file 
>> with changes]
>> ./target/classes/templates/ensam/casLoginView.html [my file with changes]
>>
>> What I missed to make my theme working ?
>>
>> Thanks
>>
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/cb43d347-4b1f-4f6a-bc7c-f7ece90785b5%40apereo.org.

Reply via email to