<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Richard Pargeter - SEO, Web Development &#38; Affiliate Marketing &#187; MCMS</title>
	<atom:link href="http://rjpargeter.com/category/web-development/mcms/feed/" rel="self" type="application/rss+xml" />
	<link>http://rjpargeter.com</link>
	<description></description>
	<lastBuildDate>Tue, 29 Sep 2009 17:39:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Determine URL of an ImagePlaceholder</title>
		<link>http://rjpargeter.com/2008/11/determine-url-of-an-imageplaceholder/</link>
		<comments>http://rjpargeter.com/2008/11/determine-url-of-an-imageplaceholder/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 06:01:32 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[MCMS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://rjpargeter.com/?p=55</guid>
		<description><![CDATA[I came across a problem recently whereby I wanted to determine the MCMS URL of an image stored in the MCMS Resource gallery.  The script had several image placeholders, some of which may of had images bound to them.
My requirements involved determining the URL of any given image and then to use this in some [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a problem recently whereby I wanted to determine the MCMS URL of an image stored in the MCMS Resource gallery.  The script had several image placeholders, some of which may of had images bound to them.</p>
<p>My requirements involved determining the URL of any given image and then to use this in some CSS styling.   Faced with this scenario the following code should help:</p>
<p><code><br />
//Setup placeholder object and string for URL<br />
Placeholder pl;<br />
string imgSrcUrl = "";</p>
<p>//setup default CSS string<br />
string FeatureCSS = ””;</p>
<p>pl = ImageX.BoundPlaceholder;//get the bound placeholder for this control<br />
if (pl!=null){//test the placholder is not null<br />
  imgSrcUrl = ((ImagePlaceholder)pl).Src ;//get the source url from the placholder<br />
  if (imgSrcUrl!=null &#038;&#038; imgSrcUrl!=”"){<br />
    FeatureCSS = “&lt;style type=\”text/css\”&gt;\n#section {\nheight: 232px;\nbackground: url(”+imgSrcUrl+”) no-repeat -26px 0;\n}\n&lt;/style&gt;”;<br />
  }<br />
  else doSomethingElse();<br />
}<br />
else doSomethingElse();<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://rjpargeter.com/2008/11/determine-url-of-an-imageplaceholder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
