RedDot / Opentext Language variants for page / Sprachvarianten

VBS Script

Function getAvailableLanguageVariantsForPage(callingPageGuid)
    dim XMLString
    dim resXML
    dim xmlDoc
    dim xmlNodeList
    dim i
    XMLString = "<IODATA loginguid='" & session("LoginGuid") & "' sessionkey='" & session("SessionKey") & "'>" & _
            "<PROJECT>" & _
            "<LANGUAGEVARIANTS action='pageavailable' pageguid='"&callingPageGuid&"' />" & _
            "</PROJECT>" & _
            "</IODATA>"
    resXML = objIO.ServerExecuteXml(XMLString, sError)
    Set xmlDoc = server.CreateObject( "Msxml2.DOMDocument.4.0" )
    xmlDoc.loadXML( resXML )
    Set xmlNodeList = xmlDoc.getElementsByTagName( "LANGUAGEVARIANT" )
    For i = 0 To( xmlNodeList.Length - 1 )
        strAvailableInLanguageVariant = strAvailableInLanguageVariant & xmlNodeList.Item(i).getAttribute( "guid" )
        ' strAvailableInLanguageVariantName = xmlNodeList.Item(i).getAttribute( "language" )
    Next
    Set xmlDoc = Nothing
    Set xmlNodeList = Nothing
End Function

RedDot / Opentext Render Tags Action

String Trim Kürzen

<%!! Escape:HtmlEncode(Context:CurrentIndex.Page.Elements.GetElement(hdl_headlin­e).Value.PadRight(Int:15).Substring(Int:0, Int:15).Trim().Remove(Int:1, Int:3).ToUpper().Equals(String:test).ToString().Length.ToString()) !!%>

Get file extension / Dateiendung ermitteln

<%!! Escape:Text(<%att_med_pdf_filename%>.Substring(Escape:Text(<%att_med_pdf_filename%>).LastIndexOf(.)) !!%>

RedDot release page without plugin but in the page

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

reddot rql finishtranslation

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,"<","&lt;")
 xmlString = replace(xmlString,">","&gt;")
 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

reddot rql release page

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

Posts Tagged red dot

Archives by Month: