[opencms-dev] Dynamic functions
Daniel Seidel
d.seidel at alkacon.com
Thu May 21 08:47:10 CEST 2026
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
More information about the opencms-dev
mailing list