Dear Łukasz,: I have like below ( /cas/cas7 is mounted to container to /etc/cas) , you mensioned that i have to modify layout.html to : fragments/nextor/footer.html but location of my customised templates is : container-/etc/cas/templates/nextor(host- /cas/cas7/templates/nextor ). And with this setings bellow Cutomised views are not appliled.
ss@zal:/cas/cas7/templates/nextor$ more layout.html <!DOCTYPE html> <html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <title layout:title-pattern="$CONTENT_TITLE - $LAYOUT_TITLE">CAS – Central Authentication Service</title> <!--/* Core CAS CSS */--> <link rel="stylesheet" type="text/css" href="../static/css/normalize.css" th:href="@{#{webjars.normalize.css}}" /> <link rel="stylesheet" type="text/css" href="../static/css/bootstrap-grid.min.css" th:href="@{#{webjars.bootstrap-grid.css}}" /> <link rel="stylesheet" type="text/css" href="../static/css/material-components-web.min.css" th:href="@{#{webjars.material-components.css}}" /> <link rel="stylesheet" type="text/css" href="../static/css/mdi-font.css" th:href="@{#{webjars.mdi-font.css}}" /> <link rel="stylesheet" type="text/css" href="../static/css/cas.css" th:href="@{${#themes.code('cas.standard.css.file')}}"/> <link rel="icon" th:href="@{/favicon.ico}" type="image/x-icon"/> </head> <body> <script th:replace="nextor/fragments/scripts" /> <div th:replace="nextor/fragments/header :: header"> <a href="nextor/fragments/header.html">Header</a> fragment will go here </div> <div class="mdc-drawer-scrim"></div> <div class="mdc-drawer-app-content mdc-top-app-bar--fixed-adjust d-flex justify-content-center" style="padding-top:0;"> <main role="main" id="main-content" class="container-lg py-4"> <div layout:fragment="content" id="content"> CAS content will go here </div> </main> </div> <div th:replace="nextor/fragments/footer :: footer"> <a href="nextor/fragments/footer.html">Footer</a> fragment will go here </div> </body> </html> Do i have to move fragments for nextor inside general fragments ? piątek, 12 marca 2021 o 10:49:39 UTC+1 Łukasz Woźniak napisał(a): > 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/4d281fe5-602d-4fb1-acb3-e234f62ea9fdn%40apereo.org.
