View Single Post
Old 04-28-2015, 08:49 PM   #1
Junior Member
 
Join Date: Jan 2015
Posts: 28
mduh is on a distinguished road
Default dashboard plugin: url open

Hello,

I have a dashboard plugin that displays tutorial links. If the user click the link, I would like to open tutorial url.

Dashboard code:
Code:
	
<metadata name="dashboard.resources" type="infolist">
	<rowdata>
		<rowgroup name="tutorials">
			<row name="tutorial_1" type="link"/>
			<row name="tutorial_2" type="link"/>
		</rowgroup>
	</rowdata>
</metadata>
What is the way to open url once the user click selected link?

I tried following plugin code but it does not work:

Code:
..
elem = "<?xml version='1.0'?><doc><url>http://example.com</url></doc>"
print answer.redirect(elem)
..
Could you please point me to documentation or example what is best way to redirect user to custom url?

Thanks,
-Maciej
mduh is offline   Reply With Quote