Hi,
as far as I know freemarker templates used by the REST API are not meant to
be customizable.

Cheers
Andrea

On Mon, Aug 24, 2020 at 6:42 AM Jody Garnett <[email protected]> wrote:

> Replying to the user list (as the developer list is for those working on
> geoserver directly - you are very much welcome to join us). Please see the
> documentation
> https://docs.geoserver.org/stable/en/user/tutorials/freemarker.html on
> the available substitutions.
>
> It does not look like the docs cover layers.ftl (so when you figure it out
> please report back).
>
> Looking at the codebase
> https://docs.geoserver.org/stable/en/user/tutorials/freemarker.html
>
> The last time this file was modified in a PR was during the refactoring
> from restlet to spring for REST API. It may be that this file is no longer
> in use.
>
> Searching:
> - https://github.com/geoserver/geoserver/search?l=FreeMarker&q=layers.ftl
> - https://github.com/geoserver/geoserver/search?l=Java&p=3&q=layers.ftl
>
> Does not show this file being accessed by java, or being included by
> another freemarker template.
>
>
> --
> Jody Garnett
>
>
> On Sun, 23 Aug 2020 at 19:12, maven apache <[email protected]> wrote:
>
>> I tried to customize the layers schema served by restful API when I
>> request it from "http://localhost:8080/geoserver/rest/layers.html";
>>
>> And I found the template
>> 'src\main\java\org\geoserver\rest\catalog\ftl-templates\layers.ftl', and I
>> want to add the title attribute, so I modified the content as following:
>>
>> ```
>>
>> <#include "head.ftl">
>> Layers:
>> <ul>
>> <#list values as l>
>>   <li><a href="${page.pageURI(l.properties.prefixedName + '.html')}" 
>> *title="${l.properties.title}"*>${l.properties.prefixedName}</a></li>
>> </#list>
>> </ul>
>> <#include "tail.ftl">
>>
>> ```
>> however no matter how I modify the content, the responses are always the
>> same without the title attribute.
>>
>> Even I run `mvn clean` before `mvn jetty:run`. Also I tried to delete the
>> file, it STILL WORK!
>>
>> What's going on?
>> _______________________________________________
>> Geoserver-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>>
> _______________________________________________
> 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
>
>
> [email protected]
> 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.*
_______________________________________________
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


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to