Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So today i started to play around with the content.ftl file for geoserver to change around the popup style. In playing i've discovered that if i call in my content.ftl file which contains code for a layer that isn't in my openlayers html then the popup doesn't work.

My question is; Can i set up multiple content.ftl files for different openlayers projects which will contain different layers? If so, how?

Example - if i Preview a layer in GeoServer for say planning applications but my content.ftl contains details for styling another of my geoserver layers as well as the planning application style, the popup doesn't appear. Remove the styling for the other layer and the pop up works!

Any help would be great.


I worked it out and heres how....

Instead of having a generic content.ftl file located in the template folder in data_dir, i moved the content.ftl into data_dir/workshop/ the layer folder and placed it here. The folder also contained featuretype and layer xml files for reference.

So now each of my layers has its own content.ftl and popup style.

share|improve this question
answer your own question in an "answer" so you can mark it as answered. – CaptDragon Dec 22 '11 at 15:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.