09-24-04 07:48 AM
As suggested we downloaded Stefan's "Save new Page without Name prompt".
OK, that effectively knocked the pop-up window out of commission and provide
d
data necessary to "complete" the save.
Now. We'd like to up the ante and be friendly to authors, as well as,
readers by creating a sensible name and display name of the page.
In contrast to "CmsPosting_Creating", "CmsPosting_Created" implies the
creation process is completed. We tortured "CmsPosting_Created" to no avail
.
It didn't do a thing for us.
Well, next we tried "CmsPosting_Changed". Again, "changed" implies the
changing is over, so we should be able to make our modifications. We got
something out of it but not much.
Our template has three custom HTML placeholders on it.
1. The following piece of code met with no complaints:
public void CmsPosting_Changed( Object sender, ChangedEventArgs e )
{
Posting newPage = e.Target as Posting;
}
2. This piece threw the method into recursion:
public void CmsPosting_Changed( Object sender, ChangedEventArgs e )
{
Posting newPage = e.Target as Posting;
newPage.DisplayName = "foo";
}
3. The next variation elicited an error saying the last placeholder in the
template could not be saved.
public void CmsPosting_Changed( Object sender, ChangedEventArgs e )
{
Posting newPage = e.Target as Posting;
Response.Write(newPage.DisplayName.ToString());
}
The objective is to read the contents of one of the placeholders and use it
for the name and display name of the posting.
We'll be immensely grateful if somebody helps us out of the predicament.
[ Post a follow-up to this message ]
|