NIHVIVO-1516 Url directive
This commit is contained in:
parent
75e7c198f9
commit
6ea23218c9
2 changed files with 4 additions and 4 deletions
|
@ -314,7 +314,7 @@ public class FreemarkerHttpServlet extends VitroHttpServlet {
|
||||||
map.put("dump", new edu.cornell.mannlib.vitro.webapp.web.directives.dump.DumpDirective());
|
map.put("dump", new edu.cornell.mannlib.vitro.webapp.web.directives.dump.DumpDirective());
|
||||||
map.put("dumpAll", new edu.cornell.mannlib.vitro.webapp.web.directives.dump.DumpAllDirective());
|
map.put("dumpAll", new edu.cornell.mannlib.vitro.webapp.web.directives.dump.DumpAllDirective());
|
||||||
map.put("help", new edu.cornell.mannlib.vitro.webapp.web.directives.dump.HelpDirective());
|
map.put("help", new edu.cornell.mannlib.vitro.webapp.web.directives.dump.HelpDirective());
|
||||||
//map.put("url", new edu.cornell.mannlib.vitro.webapp.web.directives.UrlDirective());
|
map.put("url", new edu.cornell.mannlib.vitro.webapp.web.directives.UrlDirective());
|
||||||
map.put("widget", new edu.cornell.mannlib.vitro.webapp.web.directives.WidgetDirective());
|
map.put("widget", new edu.cornell.mannlib.vitro.webapp.web.directives.WidgetDirective());
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,16 +65,16 @@ public class UrlDirective extends BaseTemplateDirectiveModel {
|
||||||
|
|
||||||
map.put("name", name);
|
map.put("name", name);
|
||||||
|
|
||||||
map.put("effect", "Generate a full url from a path. Use for generating src attribute of image tags.");
|
map.put("effect", "Generate a full url from a path by prepending the servlet context path. Use for generating src attribute of image tags, href attribute of anchor tags, etc.");
|
||||||
|
|
||||||
map.put("comments", "The path should be an absolute path, starting with '/'.");
|
map.put("comments", "The path should be an absolute path, starting with \"/\".");
|
||||||
|
|
||||||
Map<String, String> params = new HashMap<String, String>();
|
Map<String, String> params = new HashMap<String, String>();
|
||||||
params.put("path", "path");
|
params.put("path", "path");
|
||||||
map.put("params", params);
|
map.put("params", params);
|
||||||
|
|
||||||
List<String> examples = new ArrayList<String>();
|
List<String> examples = new ArrayList<String>();
|
||||||
examples.add("<@" + name + " path=\"/images/placeholders/person.thumbnail.jpg\" />");
|
examples.add("<img src=\"<@url path=\"/images/placeholders/person.thumbnail.jpg\" />\" />" );
|
||||||
map.put("examples", examples);
|
map.put("examples", examples);
|
||||||
|
|
||||||
return mergeToHelpTemplate(map, env);
|
return mergeToHelpTemplate(map, env);
|
||||||
|
|
Loading…
Add table
Reference in a new issue