Hi Community
I want to add a link to content when participant got the workflow notification and open to view the work-item, as shown in below image i want link to the content,where i can click and it takes me to content in edit mode
Solved! Go to Solution.
Views
Replies
Total Likes
@adivj95 ,
Everything under /libs/cq/inbox/content/inbox is defined as jcr:mixinTypes = "granite:InternalArea", meaning these nodes should not be overlaid, inherited or used directly.
This also implies that workitem menu or content page should not be modified.
Having said that, assuming if this nodes are not marked as granite:InternalArea, the below steps should help you out to create direct link to payload item from workitem page:
1) Overlay /libs/cq/inbox/content/inbox/details/workitem/jcr:content/actions to /apps and add a new node called "viewpayloadItem" with following properties:
This should show a new view payload action button on the action bar:
Then add this simple jquery script in a new author clientlib and making sure it is loading on the workitem page:
$( document ).ready(function() {
$(".inbox-details-workitem-action--payload").on("click", function name(params) {
var url = "/editor.html" + $(".foundation-layout-panel-body input[name=contentPath]").val() + ".html";
window.open(url, '_blank');
});
});
You may further improve this script by checking type of workflow payload item. If the payload item is a page then, prepend "/editor.html" or if the payload item is a DAM asset, then preprend "/assetdetails.html".
Just a thought.
@adivj95 ,
From the inbox window for the workflow user/approver, you can view the workflow payload in the edit mode using the "Payload" button. Please see the screenshot below.
But i want to add link on workitem page as shown in screenshot
is it possible??
@adivj95 ,
Everything under /libs/cq/inbox/content/inbox is defined as jcr:mixinTypes = "granite:InternalArea", meaning these nodes should not be overlaid, inherited or used directly.
This also implies that workitem menu or content page should not be modified.
Having said that, assuming if this nodes are not marked as granite:InternalArea, the below steps should help you out to create direct link to payload item from workitem page:
1) Overlay /libs/cq/inbox/content/inbox/details/workitem/jcr:content/actions to /apps and add a new node called "viewpayloadItem" with following properties:
This should show a new view payload action button on the action bar:
Then add this simple jquery script in a new author clientlib and making sure it is loading on the workitem page:
$( document ).ready(function() {
$(".inbox-details-workitem-action--payload").on("click", function name(params) {
var url = "/editor.html" + $(".foundation-layout-panel-body input[name=contentPath]").val() + ".html";
window.open(url, '_blank');
});
});
You may further improve this script by checking type of workflow payload item. If the payload item is a page then, prepend "/editor.html" or if the payload item is a DAM asset, then preprend "/assetdetails.html".
Just a thought.
Views
Likes
Replies