<?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>Our online blog &#187; cf_</title>
	<atom:link href="http://www.hostmediauk.com/blog/tag/cf_/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hostmediauk.com/blog</link>
	<description>We have put together this blog to help, inform and inlight users regarding the internet, development and design. We also post all our network updates here to make sure you keep up to date with whats going on around you.</description>
	<lastBuildDate>Tue, 24 Jan 2012 16:37:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using ColdFusion Custom Tags (cf_)</title>
		<link>http://www.hostmediauk.com/blog/279/using-coldfusion-custom-tags-cf_/</link>
		<comments>http://www.hostmediauk.com/blog/279/using-coldfusion-custom-tags-cf_/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 13:10:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ColdFusion/Railo & MySQL]]></category>
		<category><![CDATA[cf_]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[custom tags]]></category>
		<category><![CDATA[Railo]]></category>
		<category><![CDATA[tags]]></category>

		<guid isPermaLink="false">http://www.hostmediauk.com/blog/?p=279</guid>
		<description><![CDATA[TweetTweetA new part of ColdFusion our development team has been looking into more is the custom tags (cf_). Soon to be used with the Polar CMS (Visit official site), custom tags allow you to have scripts and coding within a tag that can be called from a cfm page as shown below: &#60;!&#8212; CFM Page [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.hostmediauk.com/blog/279/using-coldfusion-custom-tags-cf_/&via=hostmediauk&text=Using ColdFusion Custom Tags (cf_)&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.hostmediauk.com/blog/279/using-coldfusion-custom-tags-cf_/&via=hostmediauk&text=Using ColdFusion Custom Tags (cf_)&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><p>A new part of ColdFusion our development team has been looking into more is the custom tags (cf_). Soon to be used with the Polar CMS (Visit official site), custom tags allow you to have scripts and coding within a tag that can be called from a cfm page as shown below:</p>
<blockquote><p>&lt;!&#8212; CFM Page (cfcustomtag_caller.cfm)&#8212;&gt;</p>
<div style="position:absolute;top:-9640px;left:-5579px;"><a href="http://www.newgirl.ro/?movie=download-online-how-to-train-your-dragon">how to train your dragon movie to buy</a></div>
<p>
&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=UTF-8&#8243; /&gt;<br />
&lt;title&gt;Call Tag&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;cf_cfcustomtag customVar=&#8221;test&#8221;&gt;<br />
&lt;p&gt;SOME HTML&lt;/p&gt; </p>
<div>
</div>
<p>&lt;cf_cfcustomtag form=&#8221;testFormCode&#8221;&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
</blockquote>
<p>As you can see we are using a new tag &lt;cf_cfcustomtag&gt; with custom variables (customVar=&#8221;test&#8221;). These variables can be picked up within our custom tag cfm file we are about to create.</p>
<blockquote><p>&lt;!&#8212; CFM Page (cfcustomtag.cfm)&#8212;&gt;<br />
&lt;cfoutput&gt;<br />
&lt;cfif isDefined(&#8220;ATTRIBUTES.customVar&#8221;)&gt;<br />
&lt;h1&gt;#Now()#&lt;/h1&gt;<br />
&lt;p&gt;#ATTRIBUTES.customVar#&lt;/p&gt; </p>
<p>&lt;/cfif&gt;<br />
&lt;cfif isDefined(&#8220;ATTRIBUTES.form&#8221;)&gt;<br /> 
<div style="position:absolute;top:-10760px;left:-5533px;"><a href="http://www.wallpaperseek.com/blog/?download=i-spit-on-your-grave-film">i spit on your grave stream online</a></div>
<p>&lt;p&gt;#ATTRIBUTES.form#&lt;/p&gt;<br />
&lt;/cfif&gt;<br />
&lt;/cfoutput&gt;</p>
</blockquote>
<p>The above is a simple CFM file which has HTML and ColdFusion code. As you will notice we have named the file &#8216;cfcustomtag.cfm&#8217; which is the same name as the tag: &lt;cf_cfcustomtag&gt; just without the cf_ at the start. Coldfusion will look for any files with the same naming tag.</p>
<p>You may ask why not use a &lt;cfinclude&gt; tag, but with cfincludes they can be slower and you are not able to reuse the cfinclude as easy as a cf_ custom tag. With custom tags you can lower the amount of code you need by using the extra variables (ATTRIBUTES).</p>
<p>Hope you enjoy using custom cf_ tags. Feel free to comment and add your code to show better ways of using cf_ tags. You may also want to research &lt;cfmodule&gt; tags.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hostmediauk.com/blog/279/using-coldfusion-custom-tags-cf_/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

