Microsoft Content Management Server - Custom placeholders and saving

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > March 2005 > Custom placeholders and saving





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Custom placeholders and saving
Tobias Linde

2005-03-30, 5:51 pm

Hello!

I currently have a rather difficult problem:

I have created custom placeholders for a number of different purposes
in a template, for example to create an image based on text from
another html placeholder. In the SavePlaceholderContent event in the
custom placeholder I use the text from another placeholder in the same
template to create an image and save it in my custom placeholder.

The problem is that CMS seems to raise the SavePlaceholderContent
event in custom placeholders before the data in the "normal"
placeholders is saved. The custom placeholder will then not have any
text to use for the image generating task. This will only occur the
first time the posting containing the controls is saved. It will be
hard to explain to the end user that the posting has to be saved twice
in order to work properly!

Is there any way of changing the order in which the "normal"
placeholders and custom placeholders are saved? Or have I made an
error elsewhere perhaps...

Best regards/
Tobias Linde
Stefan [MSFT]

2005-03-30, 5:51 pm

Hi Tobias,

I think the sequence of the controls is the sequence of the save events
being executed.
Either top down or bottom up - I did not check.

But as a solution for your problem you could use the content from the
Request.Form field rather than from the placeholder.
Means the content of the other placeholder is in the Request.Form array.

Cheers,
Stefan.

--
This posting is provided "AS IS" with no warranties, and confers no rights
Book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Tobias Linde" <tobias.linde@ehandel.sigma.se> wrote in message
news:da2b476.0503300802.63d91473@posting.google.com...
> Hello!
>
> I currently have a rather difficult problem:
>
> I have created custom placeholders for a number of different purposes
> in a template, for example to create an image based on text from
> another html placeholder. In the SavePlaceholderContent event in the
> custom placeholder I use the text from another placeholder in the same
> template to create an image and save it in my custom placeholder.
>
> The problem is that CMS seems to raise the SavePlaceholderContent
> event in custom placeholders before the data in the "normal"
> placeholders is saved. The custom placeholder will then not have any
> text to use for the image generating task. This will only occur the
> first time the posting containing the controls is saved. It will be
> hard to explain to the end user that the posting has to be saved twice
> in order to work properly!
>
> Is there any way of changing the order in which the "normal"
> placeholders and custom placeholders are saved? Or have I made an
> error elsewhere perhaps...
>
> Best regards/
> Tobias Linde



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com