Thanks Andea, we tested this and it works so I updated the issue <https://osgeo-org.atlassian.net/projects/GEOS/issues/GEOS-9373?filter=allopenissues&orderby=priority%20DESC&keyword=template%20.ftl>to reflect this. Vera
On Sat, Oct 19, 2019 at 6:58 AM Andrea Aime <andrea.a...@geo-solutions.it> wrote: > Hi Vera, > I kept on being surprised about the "templates" bit so I did a check, it's > indeed still supported, as a general fallback, > but it's really the last attempt on user visible resources*, performed > even after checking the legacy GeoServer 1.x locations. See the full lookup > code here: > > > https://github.com/geoserver/geoserver/blob/eae842ab548519dbfb4e1923d3ff97f93180b550/src/main/src/main/java/org/geoserver/template/GeoServerTemplateLoader.java#L139 > > So I'd rather document the main path, instead of the last desperate > attempt: put the templates for > headers and footers in "dataDir/workspaces" rather than in > "dataDir/templates". > > Cheers > Andrea > > *: there is another past that, which looks up the templates in the > GeoServer own jar files. > > > > On Fri, Oct 18, 2019 at 3:35 PM Vera Green <vera.green...@gmail.com> > wrote: > >> If anyone else is struggling with this here are the steps: >> cd /opt/tomcat/webapps/geoserver/data/workspaces >> cp /yourPath/content.ftl . >> chown tomcat:tomcat content.ftl >> cd .. >> mkdir templates >> chown tomcat:tomcat templates >> cp / yourPath /header.ftl templates/. >> cp / yourPath /footer.ftl templates/. >> chown tomcat:tomcat templates/* >> >> So basically: >> >> 1. create a *templates *folder at >> /opt/tomcat/webapps/geoserver/data/ >> 2. put your header and footer in this templates folder >> 3. put your content.ftl in >> /opt/tomcat/webapps/geoserver/data/workspaces to have it apply to all >> workspaces or as per the instructions in specific lower folders to apply >> at >> the store or layer level. >> >> I'll try to post an issue in JIRA to request an update to the >> documentation as I think this is currently unclear. >> Vera >> >> >> On Thu, May 23, 2019 at 1:19 AM Andrea Aime <andrea.a...@geo-solutions.it> >> wrote: >> >>> Hi Vera, >>> I'm don't remember about a "templates" folder, the files are normally >>> put in the data dir, >>> workspace directory, if you want them to apply to the entire workspace, >>> datastore directory, >>> to apply them to all feature types coming from the store, or the feature >>> type directory itself, >>> to have one specific for the layer in question. >>> >>> Here is an example: >>> https://geoserver.geo-solutions.it/edu/en/pretty_maps/info.html >>> >>> Cheers >>> Andrea >>> >>> On Tue, May 21, 2019 at 11:16 PM Vera Green <vera.green...@gmail.com> >>> wrote: >>> >>>> Hello, >>>> I am looking at customizing some templates >>>> <https://docs.geoserver.org/latest/en/user/tutorials/GetFeatureInfo/> for >>>> WMS but I do not have a templates folder. Is this usual? Can I create it? >>>> It should be here correct: >>>> /opt/tomcat/webapps/geoserver/data >>>> >>>> GeoServer 2.15.0 running as web archive in tomcat 9.0.12 >>>> >>>> Thanks much >>>> Vera >>>> >>>> _______________________________________________ >>>> Geoserver-users mailing list >>>> >>>> Please make sure you read the following two resources before posting to >>>> this list: >>>> - Earning your support instead of buying it, but Ian Turton: >>>> http://www.ianturton.com/talks/foss4g.html#/ >>>> - The GeoServer user list posting guidelines: >>>> http://geoserver.org/comm/userlist-guidelines.html >>>> >>>> If you want to request a feature or an improvement, also see this: >>>> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer >>>> >>>> >>>> Geoserver-users@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users >>>> >>> >>> >>> -- >>> >>> Regards, Andrea Aime == GeoServer Professional Services from the >>> experts! Visit http://goo.gl/it488V for more information. == Ing. >>> Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito >>> 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: >>> +39 339 8844549 http://www.geo-solutions.it >>> http://twitter.com/geosolutions_it >>> ------------------------------------------------------- *Con >>> riferimento alla normativa sul trattamento dei dati personali (Reg. UE >>> 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si >>> precisa che ogni circostanza inerente alla presente email (il suo >>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è >>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il >>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra >>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia. >>> This email is intended only for the person or entity to which it is >>> addressed and may contain information that is privileged, confidential or >>> otherwise protected from disclosure. We remind that - as provided by >>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this >>> e-mail or the information herein by anyone other than the intended >>> recipient is prohibited. If you have received this email by mistake, please >>> notify us immediately by telephone or e-mail.* >>> >> > > -- > > Regards, Andrea Aime == GeoServer Professional Services from the experts! > Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime > @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 > Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 > 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it > ------------------------------------------------------- *Con riferimento > alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - > Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni > circostanza inerente alla presente email (il suo contenuto, gli eventuali > allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i > destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per > errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le > sarei comunque grato se potesse darmene notizia. This email is intended > only for the person or entity to which it is addressed and may contain > information that is privileged, confidential or otherwise protected from > disclosure. We remind that - as provided by European Regulation 2016/679 > “GDPR” - copying, dissemination or use of this e-mail or the information > herein by anyone other than the intended recipient is prohibited. If you > have received this email by mistake, please notify us immediately by > telephone or e-mail.* >
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users