I've got same problem with this. Problem is that You have to override main
templates to able to use fragments. For example to in file layout.html. You
have to override to use fragment from nextor

<div th:replace="fragments/nextor/footer :: footer">
    <a href="fragments/nextor/footer.html">Footer</a> fragment will go here
</div>


śr., 10 mar 2021 o 16:36 artur miś <[email protected]> napisał(a):

> *Gradle.properties*
>
> ss@zal:~/cas.6.3_10_10_2020_update/cas-overlay-template-master$ cat
> gradle.properties
>
> cas.version=6.3.2
>
> springBootVersion=2.3.4.RELEASE
>
> appServer=-tomcat
>
> executable=false
>
> tomcatVersion=9.0.38
>
> group=org.apereo.cas
>
> sourceCompatibility=11
>
> targetCompatibility=11
>
> jibVersion=2.8.0
>
> shellDir=build/libs
>
> ivyVersion=2.4.0
>
> gradleDownloadTaskVersion=4.1.1
>
> gradleMavenPluginVersion=5.2.1
>
> gradleLombokPluginVersion=5.2.1
>
> baseDockerImage=adoptopenjdk/openjdk11:alpine-jre
>
> allowInsecureRegistries=false
>
>
>
> *cas.propierties*
>
> spring.thymeleaf.prefix=classpath:/templates/
>
> cas.view.template-prefixes[0]=file:///etc/cas/templates ← store for  views
> outside the cas.war
>
>
>
>
> *services*:
>
> ss@zal:/cas/cas7/services$ cat  prg-3.json
>
> {
>
>   "@class" : "org.jasig.cas.services.RegexRegisteredService",
>
>   "serviceId" : "^(http|https|imaps)://newton.xx/.*",
>
>   "name" : "PRG_PABLO",
>
>   "id" : 3,
>
>   "evaluationOrder" : 0,
>
>   "theme" : "nextor",
>
>    "authenticationPolicy" : {
>
>     "@class" :
> "org.apereo.cas.services.DefaultRegisteredServiceAuthenticationPolicy",
>
>     "requiredAuthenticationHandlers" : ["java.util.TreeSet", ["xxx",
> "yyyy" ]]
>
>   },
>
> }
>
>
> *Copy templates outside the webapp:*
>
> cp -rp
> :~/cas.6.3_10_10_2020_update/cas-overlay-template-master/src/main/resources
> /cas/cas7/templates
>
> /cas/cas7$ ls
>
> config  services  templates  thekeystore
>
>
>
> *Removing templates from cas overlay:*
>
> cd
> ~/cas.6.3_10_10_2020_update/cas-overlay-template-master/src/main/resources$
> ls
>
> messages_pl.properties  nextor.properties  static  templates
>
> rm -rf templates
>
>
>
> *Theme files/tree:*
>
> ss@zal~/cas.6.3_10_10_2020_update/cas-overlay-template-master/src/main/resources$
> cd static/
>
> ss@zal:~/cas.6.3_10_10_2020_update/cas-overlay-template-master/src/main/resources/static$
> ls
>
> css  images  js  themes
>
> ss@zal:~/cas.6.3_10_10_2020_update/cas-overlay-template-master/src/main/resources/static$
> cd themes/
>
> ss@zal:~/cas.6.3_10_10_2020_update/cas-overlay-template-master/src/main/resources/static/themes$
> ls
>
> nextor
>
> ss@zal:~/cas.6.3_10_10_2020_update/cas-overlay-template-master/src/main/resources/static/themes$
> cd nextor/
>
> ss@zal:~/cas.6.3_10_10_2020_update/cas-overlay-template-master/src/main/resources/static/themes/nextor$
> ls
>
> css  images  js
>
>
>
> *Theme def:for service nextor*
>
> ss@zal~/cas.6.3_10_10_2020_update/cas-overlay-template-master/src/main/resources$
> cat nextor.properties
>
> cas.theme.defaultThemeName=nextor
>
> cas.standard.css.file=/themes/nextor/css/cas.css
>
> cas.standard.js.file=/themes/nextor/js/cas.js
>
>
> *Image creation:*
>
> ./gradlew --info build jibDockerBuild
>
>
> *Creation container:*
>
> sudo docker run  --name cas2localTT    -v /cas/cas7:/etc/cas -p
> 127.0.0.1:4444:8443 -d org.apereo.cas/cas:latest
>
>
>
> *Result:*
>
> reguest: https://sample.xx/casphp/login?service=https://newton.xx/
>
> It is using files from  /etc/cas/templates  but only for  default files
> (/etc/cas/templates/fragments/footer.html)  . It doesn’t uses nextor views
> at all. I thought that if i have theme  nextor.properties it will be use
> views defined in  folder templates/nextor .  Problably i have missed
> something  but i don’t know what. Could you help me please ?
>
> How i menssioned before:
>
> ss@zal/cas/cas7/templates$ ls
>
> casLoginView.html  fragments  nextor
>
> If i change footer.html i can see changes on website but if i change
> footer.htm in nextor  i can not  see result.
>
> Obviously if I  have all in  cas.war   I have customised  view nextor
> working.
>
> --
> - 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/9fde0bf8-e0b1-41c0-a03e-f9548bd5fbd8n%40apereo.org
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/9fde0bf8-e0b1-41c0-a03e-f9548bd5fbd8n%40apereo.org?utm_medium=email&utm_source=footer>
> .
>

-- 
- 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/CAD1CM_g2ARfuYOcO9qu0qkhG3yh6DM46qCB_3%3D4UVkXRZEoTOg%40mail.gmail.com.

Reply via email to