Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
script tag code hide after save template
Hi,
I have one issue in my server, where I am creating a web content template and write <script>...............</script> after Freemarker coding.
But after successfully save this template, code within <script> is hide. Kindly help, why this happened.
I have one issue in my server, where I am creating a web content template and write <script>...............</script> after Freemarker coding.
But after successfully save this template, code within <script> is hide. Kindly help, why this happened.
Deepak PandaWorks for me. DXP 7.1 SP1, created a Template for Basic Web Content like this:
I have one issue in my server, where I am creating a web content template and write <script>...............</script> after Freemarker coding.
But after successfully save this template, code within <script> is hide. Kindly help, why this happened.
${content.getData()}
<script>alert('test');</script>
And it works as expected: Nags me every time I load the page, and survives template edits.
It's the javascript minifier. It drops script tags in several Liferay versions.
Try "<script type="text/javascript">", then it should work it in most Liferay version.
Try "<script type="text/javascript">", then it should work it in most Liferay version.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™