Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

Med

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/.....to 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
2  
answer your own question in an "answer" so you can mark it as answered. –  CaptDragon Dec 22 '11 at 15:04
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.