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/.....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.