[opencms-dev] Dynamic functions
laurent.druart
laurent.druart at ldict.be
Thu May 21 10:47:24 CEST 2026
Hello Daniel,
I only have a container type option, no container width
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GraphiqueColl?-1.png
Type: image/png
Size: 172024 bytes
Desc: not available
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20260521/9d3ac5a1/attachment-0001.png>
-------------- next part --------------
My JSP is already very simple, only html
My function is already in my site map configuration
Thank for your help,
Regards,
Laurent
> Le 21 mai 2026 à 10:01, Daniel Seidel <d.seidel at alkacon.com> a écrit :
>
> Hi Laurent,
>
> three things:
>
> 1. Make the JSP even simpler. Just use <h1>Hello World!</h1> as content.
>
> 2. You must use a container name that fits to a container the function should match. Or use container width and set width 0 to make it fit everywhere
>
> 3. You may have to add the function in your sitemap master configuration (or the sitemap configuration) in the dynamic functions tab.
>
> Best, Daniel.
>
> Am 21.05.26 um 08:59 schrieb laurent.druart:
>> Hello Daniel,
>>
>> Thank you four your answer.
>>
>> At the moment I created a dynamic function in a module, very simple jsp
>> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
>> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
>> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
>> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
>>
>> and html tags, no logic
>>
>> The jsp file is located in my module in /elements/functions/
>> I declared the Dynamic Function in /functions and filled the JSP field with /elements/functions/myfunction.jsp
>> In the field « Container type »: *
>>
>> In the sitemap master config I added the dynamic function in « dynamic functions » tab in the field « Dynamic function to be added »
>>
>> But in page editor my dynamic function is not appearing.
>>
>> I’m not using the Mercury template.
>>
>> Do I miss something?
>>
>> Thanks for your help.
>>
>> Regards,
>>
>> Laurent
>>
>>
>>> Le 21 mai 2026 à 08:47, Daniel Seidel via opencms-dev <opencms-dev at opencms.org> a écrit :
>>>
>>> Hi Laurent,
>>>
>>> for current OpenCms versions I'd see both concepts separated.
>>>
>>> 1. Dynamic functions ("Content without content"): You may see this content like a formatter configuration that you don't have to backup with a content type you created. The only drawback (I see) is that all dynamic functions will appear under "Dynamic function" in the add wizard of the page editor. Hence, all functionality that is dynamic will appear in the same "box". The default Mercury template uses various dynamic functions. You find them under "Advanced elements" in the add wizard.
>>>
>>>
>>> 2. Function detail pages: I essence, it's just a way to make a page linkable by a special name. Forget about the additional configurations that will make the function appear on the function detail page (the container.info property), they barely work for nested containers, but you can place the function by hand on the function detail page.
>>>
>>> Here's an example:
>>>
>>> Assume in your template you have a footer always adding a "Privacy" link. But, depending on the site or the locale you are in, the link should point to different urls. That's a good example for a function detail page.
>>>
>>> In your template JSP when you add the link, just use ${cms.functionDetail['privacy']} as link target.
>>>
>>> And in the sitemap configurations of your (sub-)sites add the detail page 'function at privacy' pointing to the (sub-)site specific URL. If you added the function as named function in the module (see https://documentation.opencms.org/opencms-documentation/template-development/dynamic-functions/function-detail-pages), you may also do this via the sitemap editor by adding a function page. But this is optional, adding it just by hand in the .config file is good as well.
>>>
>>> The default demo of the current OpenCms version uses a function detail page (that is not configured as named) for the search page. You find a detail page 'function at Search page' in the sitemap configurations.
>>>
>>>
>>> Best, Daniel.
>>>
>>>
>>> Am 20.05.26 um 18:24 schrieb laurent.druart via opencms-dev:
>>>> Hello,
>>>>
>>>> Does someone have a tutorial for « dynamic functions » and « function detail page » ?
>>>>
>>>> The 2 examples pages in the doc are « empty » .
>>>>
>>>> https://documentation.opencms.org/opencms-documentation/todo/demos/dynamic-functions
>>>> https://documentation.opencms.org/opencms-documentation/todo/demos/function-detail-pages
>>>>
>>>> Thank you,
>>>>
>>>> Regards,
>>>>
>>>> Laurent
>>>>
>>>> _______________________________________________
>>>> This mail is sent to you from the opencms-dev mailing list
>>>> To change your list options, or to unsubscribe from the list, please visit
>>>> https://lists.opencms.org/mailman/listinfo/opencms-dev
>>>>
>>>>
>>>>
>>> --
>>> Kind Regards
>>>
>>> Daniel.
>>>
>>> -------------------
>>>
>>> Daniel Seidel
>>> Alkacon Software GmbH & Co. KG - The OpenCms Experts
>>> https://www.alkacon.com - http://www.opencms.org
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list
>>> To change your list options, or to unsubscribe from the list, please visit
>>> https://lists.opencms.org/mailman/listinfo/opencms-dev
>>>
>>>
>>>
> --
> Kind Regards
>
> Daniel.
>
> -------------------
>
> Daniel Seidel
> Alkacon Software GmbH & Co. KG - The OpenCms Experts
> https://www.alkacon.com - http://www.opencms.org
>
More information about the opencms-dev
mailing list