Open URL in new tab
Hello everyone.
I would like to open a URL in a new tab when a user clicks, i know from the action menu.
But my question is how can i write the activity that contain URL to use in action menu and what the action i will use to open a URL in a new tab when a user clicks ?
Thanks in advance.
***Edited by Moderator Marije to change type from General to Product***
-
Like (0)
-
Accepted Solution
Try this approach:
- Create a Data Page and Use your Data Transform as the source
- In your Section where you need to show the link, declare the Data Page and Pages&Classes
- Go to Open URL in Window, Select Alternate domain then give the property reference along with the Data Page name.
<Data Page Name>.<Target Property>
- Save and test.
It depends what you are actually trying to open in a new tab.
If you just want to open a link you can check the "Use Alternate Domain" checkbox, and then it will let you use a direct URL reference or a property reference.
If you want to open a case and are using Cosmos you can follow the advice here:
So, this way to opens the link in a new tab and the current page remains as it is, right?
yes i have direct link but how can i use as reference or a property reference and where i put this link, can you explain more?
"So, this way to opens the link in a new tab and the current page remains as it is, right?"
Correct!
"yes i have direct link but how can i use as reference or a property reference and where i put this link, can you explain more?"
You can either directly input the URL if it is static like this:
Or you can use a property reference as shown in my original post, you can set the property in any way in your case, such as in a data transform or as user input. Capture the URL in this property before showing the link so that the link points to the correct URL:
Thank you for your answer.
I have a new requirement, make the URL as dynamic by DSS.
So, I created the data transform with one step like that
[ Action: Set , Target: .property , Source: @getDataSystemSetting(Ruleset,DSS) ]
Note: the property I defined it as Text.
Then I created the activity to call data transform with one step like that
Method: Apply-DataTransform
And then, I went to the navigation, and inside it the action menu I use the (Open URL in Window) by call the activity.
At the end: When I click on the navigation, It opens in a new tab but doesn't return the URL page.
Accepted Solution
Try this approach:
- Create a Data Page and Use your Data Transform as the source
- In your Section where you need to show the link, declare the Data Page and Pages&Classes
- Go to Open URL in Window, Select Alternate domain then give the property reference along with the Data Page name.
<Data Page Name>.<Target Property>
- Save and test.
@KEVIN1003 Thank you for your reply, this way is working properly.