[opencms-dev] Content element creation with PDF button
Daniel Seidel
d.seidel at alkacon.com
Thu May 18 16:57:29 CEST 2017
Hi Jane,
just a guess: The new element is "in memory only" when you first drag it
on the page. It gets persisted when you edited it. The <cms:pdf> might
have problems with that situation. You could try to use something like:
<c:if test="${not cms.inMemoryOnly}">
<c:set
var="PDF">/system/modules/myModule/elements/PDF-formatter.jsp</c:set>
<a href="<cms:pdf format='${PDF}' content='${content.filename}'
locale='${cms.locale}' />" target="pdf" class="btn">PDF</a>
</c:if>
That would render the link only if the element is not "in memory only".
Best, Daniel.
Am 18.05.2017 um 15:40 schrieb Jane Austen Stardust:
>
> Hello!
>
> I'm using OpenCms 10.5.1.
>
> I can't add a content element by the page editor add wizard if it
> contains the PDF creation button script.
>
> But I can create it in the Explorer and then drag it from the page
> editor add wizard, and works correctly.
>
> Here is the PDF creation button script that I use:
>
> <c:set
> var="PDF">/system/modules/myModule/elements/PDF-formatter.jsp</c:set>
> <a href="<cms:pdf format='${PDF}' content='${content.filename}'
> locale='${cms.locale}' />" target="pdf" class="btn">PDF</a>
> What's wrong?
> Thanks a lot!
> JA
>
>
> _______________________________________________
> 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
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
--
Kind Regards,
Daniel.
-------------------
Daniel Seidel
Alkacon Software GmbH & Co. KG - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170518/23efa3d7/attachment.htm>
More information about the opencms-dev
mailing list