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
Workflow for content not able to get content Title
Hi,
I am using single approver workflow only. But I changed the notification message as my custom message,
I am not able to get content title.
<template>
<![CDATA[${title}
was transmitted for review by ${userName}]]>
</template>
${entryType} - Web Content
${userName} - Test Test
I want title - Title of the content
I tried with groovy script also, its not working
If anyone knows please help me?
I believe this is what inserts the context variables:
I think ${taskName} might get what you want?
Hi Amos,
Thanks for reply
Using ServiceLocator I get the page title. by using the workflow context object.
Use below code in definition xml
<#assign LayoutArticleLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")/>
<#assign plId = serviceContext.plid/>
<#assign attributes = serviceContext.getAttributes()/>
<#assign lang = serviceContext.languageId/>
<#assign layoutservice = LayoutArticleLocalService.fetchLayout(plId)/>
<#assign title = layoutservice.getName(lang)/>
${title}
Powered by Liferay™