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

Reply via email to