[opencms-dev] Escaping macros
Paul-Inge Flakstad
flakstad at npolar.no
Tue Jul 17 15:01:34 CEST 2012
Hi Alex,
Yeah, I am in the XSD, so I'll have to solve the problem some other way.
Anyway, thanks for your quick reply!
PS: It would be nice to have the ability to trigger this "keepEmptyMacros" from the XSD, or alternatively the ability to escape macros. I try to offer macros to the editor when it's helpful, and it would be nice to also show an example/default macro usage in default content.
Cheers,
Paul
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Alexander Kandzior
Sent: 17. juli 2012 13:44
To: 'The OpenCms mailing list'
Subject: Re: [opencms-dev] Escaping macros
IIRC escaping is not possible.
In the macro resolver class there's an option "keepEmptyMacros" which should just leave empty macros unresolved. But I guess you are not on the API level but rather in the XSD schema configuration so that won't help much.
Kind Regards,
Alex.
-------------------
Alexander Kandzior
Alkacon Software GmbH - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
From: opencms-dev-bounces at opencms.org<mailto:opencms-dev-bounces at opencms.org> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Paul-Inge Flakstad
Sent: Tuesday, July 17, 2012 12:36 PM
To: The OpenCms mailing list
Subject: [opencms-dev] Escaping macros
Hi all,
Is it possible to escape macros in OpenCms?
I want to define "Found %(list.count) matches" as the default string value for a structured content element.
But naturally, OpenCms sees the macro %(list.count), and attempts to resolve it. (Whether I define the default value directly inside the XSD or in a workplace.properties file makes no difference.)
So I guess I need to somehow escape %(list.count), to prevent OpenCms from attempting to resolve it as a macro and instead just treat it as regular text. (Alternatively, I can of course use a different macro format, but for consistency I would prefer to use this format.)
Thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120717/b455feca/attachment.htm>
More information about the opencms-dev
mailing list