NIHVIVO-1516 Url directive

This commit is contained in:
ryounes 2011-03-18 19:26:11 +00:00
parent 75e7c198f9
commit 6ea23218c9
2 changed files with 4 additions and 4 deletions

View file

@ -314,7 +314,7 @@ public class FreemarkerHttpServlet extends VitroHttpServlet {
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("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());
return map;
}

View file

@ -65,16 +65,16 @@ public class UrlDirective extends BaseTemplateDirectiveModel {
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>();
params.put("path", "path");
map.put("params", params);
List<String> examples = new ArrayList<String>();
examples.add("<@" + name + " path=\"/images/placeholders/person.thumbnail.jpg\" />");
examples.add("&lt;img src=\"<@url path=\"/images/placeholders/person.thumbnail.jpg\" />\" /&gt;" );
map.put("examples", examples);
return mergeToHelpTemplate(map, env);