Note
Tag definitions based on the properties files are available only if you configure the Intershop Studio for Intershop of version 6.7 or higher.
The custom ISML tag generates a UUID and stores it in the pipeline dictionary under a specified name. To create and use a custom ISML tag, follow these steps:
Java class implementation
The custom ISML tag is implemented by extending the com.intershop.beehive.core.internal.template.isml.CustomTag
class.
Implementation example:
package com.intershop.component.foundation.internal.uuid; import java.io.IOException; import com.intershop.beehive.core.capi.naming.NamingMgr; import com.intershop.beehive.core.capi.request.ServletResponse; import com.intershop.beehive.core.capi.util.UUIDGenerator; import com.intershop.beehive.core.internal.template.AbstractTemplate; import com.intershop.beehive.core.internal.template.TemplateExecutionConfig; import com.intershop.beehive.core.internal.template.isml.CustomTag; import jakarta.servlet.ServletException; import jakarta.servlet.jsp.PageContext; public class UUIDTag extends CustomTag { @Override public void processOpenTag(PageContext pageContext, ServletResponse response, AbstractTemplate template, int line) throws IOException, ServletException { TemplateExecutionConfig context = AbstractTemplate.getTemplateExecutionConfig(); String name = (String) context.getPipelineDictionary().get("name"); if (name == null) { name = "UUID"; } context.getPipelineDictionary().put(name, NamingMgr.get(UUIDGenerator.class).createUUIDString().replace(".", "-")); } }
Register the custom tag in modules.properties
To make the tag available in ISML templates, register it in the modules.properties file located in the
See the sample modules.properties based on the example of the ISML custom tag ISUUID
:
# Register the custom ISUUID tag ismodules.ISUUID.class = com.intershop.component.foundation.internal.uuid.UUIDTag ismodules.ISUUID.isStrict = false ismodules.ISUUID.parameter.name.isRequired = false
Title | Product Version | Product To Version | Short Description |
---|---|---|---|
ISML Custom Tag - ISCONTENTINCLUDE | 6.7 |
| directly includes content into the storefront |
ISML Custom Tag - ISCREATEPLACEHOLDERRENDEREVENTS | 7.7 | Creates the necessary render events for pagelets that are assigned to placeholders (in case they are not rendered with <ISSlot> ). | |
ISML Custom Tag - ISGETPAGELETENTRYPOINT | 6.7 |
| returns a Pagelet Entry Point object |
ISML Custom Tag - ISGETPAGELETSOFPAGELETENTRYPOINT | 6.7 |
| iterates all available pagelets of pagelet entry point and stores the key for the iterable objects in the pipeline dictionary |
ISML Custom Tag - ISPAGELET | 6.7 |
| directly renders a component |
ISML Custom Tag - ISPAGELETASSIGNMENT | 7.7 | directly renders a component based on an assignment | |
ISML Custom Tag - ISPAGELETENTRYPOINT | 6.7 |
| directly renders the content of a given pagelet entry point |
ISML Custom Tag - ISRENDERENTITYRENDERINGEND | 6.7 |
| states that the rendering of the given render object has finished |
ISML Custom Tag - ISRENDERENTITYRENDERINGSTART | 6.7 |
| states that the rendering of the given render object starts |
ISML Custom Tag - ISSETCANONICALLINK | 7.4 |
| calculates a canonical link and puts it in the pipeline dictionary |
ISML Custom Tag - ISSLOT | 6.7 |
| requests the contents of a slot from within the pagelet's render template |
ISML Custom Tag - ISSLOTITERATOR | 6.7 |
| Wraps the contents of a slot as an iterator object |
ISML Custom Tag - ISUUID | 6.7 |
| generates a single UUID string for a given name |
ISML Custom Tag - ISVIEWCONTEXT | 7.1 |
| The module to trigger object rendering via view contexts in ISML. |