Adding a caption to a custom summary control
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > Adding a caption to a custom summary control




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Adding a caption to a custom summary control  
Rob


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-22-07 06:30 AM

BACKGROUND: We have a template with a custom control that uses a
collection of news release postings to create a summary page with the
headline, date, and snippet of the article.  We have two additional
placeholders: one is for a summary image - the other is for a
corresponding caption.  The desired layout is for the image and
caption to be inline with the story snippet wrapping around it.  These
elements are under the headline and date.  We have accomplished this
with a div surrounding the image and caption. The article summary
wraps around the div to the right or left based on a custim property
in each release..

PROBLEM: There is no fixed size for this summary thumbnail.  Since the
image width varies with each image, we need the caption to wrap at the
end of the image.  Currently, no width is set for the div and long
captions stretch past their images.  To force this wrap, we would need
a dynamic way to have the div width match the width of the image used
for that summary.

Is there a way to pull the image width from the Single Image
Placeholder?  If not, does any one have an alternative suggestion to
implement this?






[ Post a follow-up to this message ]



    Re: Adding a caption to a custom summary control  
Stefan Goßner [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-24-07 12:24 PM

Hi Rob,

what you can do is to do a HttpWebRequest against the URL, consume the
response stream in an Image object and then check the size here.

Cheers,
Stefan


"Rob" <saxon_rm@mercer.edu> wrote in message
news:1190430258.414928.85430@r29g2000hsg.googlegroups.com...
> BACKGROUND: We have a template with a custom control that uses a
> collection of news release postings to create a summary page with the
> headline, date, and snippet of the article.  We have two additional
> placeholders: one is for a summary image - the other is for a
> corresponding caption.  The desired layout is for the image and
> caption to be inline with the story snippet wrapping around it.  These
> elements are under the headline and date.  We have accomplished this
> with a div surrounding the image and caption. The article summary
> wraps around the div to the right or left based on a custim property
> in each release..
>
> PROBLEM: There is no fixed size for this summary thumbnail.  Since the
> image width varies with each image, we need the caption to wrap at the
> end of the image.  Currently, no width is set for the div and long
> captions stretch past their images.  To force this wrap, we would need
> a dynamic way to have the div width match the width of the image used
> for that summary.
>
> Is there a way to pull the image width from the Single Image
> Placeholder?  If not, does any one have an alternative suggestion to
> implement this?
>







[ Post a follow-up to this message ]



    Re: Adding a caption to a custom summary control  
j.madgwick@wiganmbc.gov.uk


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-26-07 06:22 PM

Hi Rob,

We had a similar problem with the News section of our site.  We have
used JavaScript to restrict the width of the caption after the image
has loaded in the browser:
http://www.wigan.gov.uk/News/Archiv.../LeighProms.htm

View the source of the page above and look for "function
amendCaptionSize".

Hope it helps,
John.






[ Post a follow-up to this message ]



    Re: Adding a caption to a custom summary control  
j.madgwick@wiganmbc.gov.uk


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-26-07 06:22 PM

Oh yeah, if you do use this JavaScript technique, make sure you put
the script in a PresentationModeContainer so it doesn't interfere with
the authoring controls.

On 26 Sep, 15:11, j.madgw...@wiganmbc.gov.uk wrote:
> Hi Rob,
>
> We had a similar problem with the News section of our site.  We have
> used JavaScript to restrict the width of the caption after the image
> has loaded in the browser:
>        http://www.wigan.gov.uk/News/Archiv.../LeighProms.htm
>
> View the source of the page above and look for "function
> amendCaptionSize".
>
> Hope it helps,
> John.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:59 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register