<%!! Context:CurrentIndex.GetRootIndex().GetUrl() !!%>
Simple render tag and it works!
Jun 8
Posted by mario in Daily Business, Technik | No Comments
Today I had the issue to release a page without able to access the file system and creating a plugin for that which would be nicer. But it also works inside the content template class. it is no ideal, but it works and reloads the page.
<script language="javascript">
function release_page(){
location.href='ioRD.asp?Action=ReleasePage&EditLinkGuid=<%PageGUID%>';
location.reload();
return true;
}
</script>
<a href="#" onclick="release_page();"><img border="0" src="Icons/Release.gif"></a> release snippet
Howto get a page released from translation editor
Function finishtranslation(pageguid,availableLangVariantId)
dim xmlString
dim resXML
xmlString = "" _
& "<IODATA loginguid=""" & Session("LoginGuid") & """ sessionkey=""" & Session("SessionKey") & """>" & Vbcrlf _
& "<WORKFLOW>" & Vbcrlf _
& "<PAGES action=""finishtranslation"" sourcelanguageid="""& Session("LanguageVariantId") & """ targetlanguageid=""" & availableLangVariantId & """>" & Vbcrlf _
& "<PAGE guid=""" & pageguid & """/>" & Vbcrlf _
& "</PAGES>" & Vbcrlf _
& "</WORKFLOW>" & Vbcrlf _
& "</IODATA>" & Vbcrlf
If show_debug = true then
Response.write("<div style=""margin-left:20px; border:1px solid green;""")
xmlString = replace(xmlString,"<","<")
xmlString = replace(xmlString,">",">")
Response.write("[" & xmlString & "]")
response.write("</div>")
End If
resXML = objIO.ServerExecuteXml(XMLString, sError)
If sError <> "" Then
Response.Write "<span style='color:red'>" & sError & "</span><br />"
End If
End Function
Lorem
Set objIO = Server.CreateObject("RDCMSASP.RdPageData")
objIO.XmlServerClassName = "RDCMSServer.XmlServer"
Function release_page(thispageGuid)
dim xmlString
dim resXML
xmlString = "" _
& "<IODATA loginguid=""" & Session("LoginGuid") & """ sessionkey=""" & Session("SessionKey") & """>" & Vbcrlf _
& " <PAGE action=""save"" actionflag=""4096"" guid=""" & thispageGuid & """ globalrelease=""0"" languagevariantid=""" & Session("LanguageVariantId") & """/>" & VbCrLf _
& "</IODATA>" & Vbcrlf
resXML = objIO.ServerExecuteXml(XMLString, sError)
If sError <> "" Then
Response.Write "<span style='color:red'>" & sError & "</span><br />"
End If
End Function
| powered by Apache 2.4