RQL isn't required to do this. We have a little box that we display on
every page in RedDot that has a link to change the filename. We only
use RQL to display the current filename. The following code shows the
Page ID, Filename, and a link to open Page Preview. Style as you see
fit.
<!IoRangeRedDotMode>
<script language="Javascript" type="text/javascript">
var currentlyDisplayingInfo = 1;
function toggleInfo()
{
if (currentlyDisplayingInfo == 1)
{
document.getElementById("reddotinfocon").style.display =
"none";
document.getElementById("reddotinfo").style.height = "26px";
document.getElementById("reddotinfohidelink").innerHTML =
"Show";
currentlyDisplayingInfo = 0;
}
else
{
document.getElementById("reddotinfocon").style.display =
"block";
document.getElementById("reddotinfo").style.height = "160px";
document.getElementById("reddotinfohidelink").innerHTML =
"Hide";
currentlyDisplayingInfo = 1;
}
}
</script>
<div id="reddotinfo">
<h2><span><a href="#" onClick="toggleInfo()"
id="reddotinfohidelink">Hide</a></span> Page Info</h2>
<div id="reddotinfocon">
<p><em>Page ID:</em> <%info_PageID%></p>
<p><em>Filename:</em> <!IoRangeRedDotEditOnly><a
href='javascript:void(0)' onclick='OpenWindow("ioRD.asp?
Action=EditPageSettings&EditPageGuid=<%= pageGUID
%>&CalledFromRedDot=1&OpenerIsRedDot=1", 650,
550);return(false);'><img src="icons/reddot.gif"></a> <span
class="redtext">Edit Filename</span><!/IoRangeRedDotEditOnly>
<%
set XMLDOM1 = Server.CreateObject("Microsoft.XMLDOM")
Set objXMLDOM1 = Server.CreateObject("Microsoft.XMLDOM")
set RQLObject1 = Server.CreateObject("RDCMSServer.XmlServer")
Set objIO1 = Server.CreateObject("RDCMSAsp.RdPageData")
objIO1.XmlServerClassName = "RDCMSServer.XmlServer"
loginGUID = "<%info_LoginGUID%>"
sessionKey = "<%info_SessionKey%>"
function getFilename()
dim filename, oNode
ExecuteRQL "<PAGE action=""load"" guid=""" & pageGUID & """/>"
set oNode = XMLDOM1.selectSingleNode("//PAGE")
filename = oNode.getAttribute("name")
getFilename = filename
end function
function ExecuteRQL (sCommand)
Dim RQLStatement, ServerError, RQLRequest
RQLStatement = "<IODATA loginguid=""" & loginGUID & """
sessionkey=""" & sessionKey & """>" & sCommand & "</IODATA>"
RQLRequest = RQLObject1.Execute(RQLStatement, ServerError)
call XMLDOM1.LoadXML(RQLRequest)
end function
function destructor()
set XMLDOM1 = Nothing
set RQLObject1 = Nothing
end function
filename = getFilename()
If filename = "" Then
GenerateFileName pageGUID, pageID
filename = getFilename()
End If
Response.Write filename
destructor()
%>
</p>
<p><a href="<%= callingURL %>">Parent Page</a></p>
<p><a href='javascript:void(0)' onclick='OpenWindow("ioRD.asp?
Action=RedDot&Mode=0&OnLoad=0&PageGuid=<%= pageGUID
%>&SmartEditLinkGuid=<%= pageGUID %>&LinkFromGuid=<%= pageGUID
%>&CalledFromRedDot=1&WithCache=0&Isolated=0&PageLocked=0&Rights1=-33570817&DummyTime=1161020242859",
650, 550, "ONLINEHELP");return(false);'>Page Preview</a></p>
</div>
</div>
<!/IoRangeRedDotMode>
On Aug 2, 5:13 pm, jkinzel <[email protected]> wrote:
> Is there a way to edit the "Published File Name" in Smart Edit without
> having to go into the "Page Properties" dialog? I know you cannot edit
> "info elements" through smart edit,
>
> I assume it will have to be done through RQL, but I was wondering if
> anyone has done this before. I thought I saw this somewhere before,
> but I can't seem to find it now.
--
You received this message because you are subscribed to the Google Groups
"RedDot CMS Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/reddot-cms-users?hl=en.