Index: main/plugin-web/src/org/ametys/web/transformation/xslt/AmetysXSLTHelper.java
===================================================================
--- main/plugin-web/src/org/ametys/web/transformation/xslt/AmetysXSLTHelper.java (revision 29408)
+++ main/plugin-web/src/org/ametys/web/transformation/xslt/AmetysXSLTHelper.java (working copy)
@@ -273,6 +273,34 @@
}
/**
+ * Computes the URI for the given image with a given heigth and width in the current site's skin.
+ * If the URI is requested by the front-office, it will be absolutized.
+ * @param path the resource path
+ * @param height the height for the resource to get
+ * @param width the width for the resource to get
+ * @return the URI of the given resource
+ */
+ public static String skinImage(String path, int height, int width)
+ {
+ String skinPath = skinURL(path);
+ return StringUtils.substringBeforeLast(skinPath, ".") + "_" + height + "x" + width + "." + StringUtils.substringAfterLast(skinPath, ".");
+ }
+
+ /**
+ * Computes the URI for the given image with a given heigth and width in the current site's skin.
+ * If the URI is requested by the front-office, it will be absolutized.
+ * @param path the resource path
+ * @param maxHeight the maximum height for the resource to get
+ * @param maxWidth the maximum width for the resource to get
+ * @return the URI of the given resource
+ */
+ public static String skinBoundedImage(String path, int maxHeight, int maxWidth)
+ {
+ String skinPath = skinURL(path);
+ return StringUtils.substringBeforeLast(skinPath, ".") + "_max" + maxHeight + "x" + maxWidth + "." + StringUtils.substringAfterLast(skinPath, ".");
+ }
+
+ /**
* Computes the URI for the given resource in the current template.
* If the URI is requested by the front-office, it will be absolutized.
* @param path the resource path.
Index: main/workspace-web/sitemap.xmap
===================================================================
--- main/workspace-web/sitemap.xmap (revision 29408)
+++ main/workspace-web/sitemap.xmap (working copy)
@@ -121,8 +121,28 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+