<?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>cfalzone &#187; Velocity</title>
	<atom:link href="http://www.cfalzone.com/blog/tag/velocity/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cfalzone.com/blog</link>
	<description>Christopher Falzone's Blog</description>
	<lastBuildDate>Thu, 15 Jul 2010 19:38:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Getting Started with Velocity in DotCMS</title>
		<link>http://www.cfalzone.com/blog/2008/08/vlocity-in-dotcms/</link>
		<comments>http://www.cfalzone.com/blog/2008/08/vlocity-in-dotcms/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 19:38:00 +0000</pubDate>
		<dc:creator>cfalzone</dc:creator>
				<category><![CDATA[DotCMS]]></category>
		<category><![CDATA[Velocity]]></category>

		<guid isPermaLink="false">http://www.cfalzone.com/blog/?p=1</guid>
		<description><![CDATA[I seem to get a lot of questions on how to start with velocity coding. What is available? What is the Syntax? I think it’s a good question so it’s time to write up a quick post about it. First off, I would start with actually building your site. Come up with a need. Start [...]]]></description>
			<content:encoded><![CDATA[<p>I seem to get a lot of questions on how to start with velocity coding.  What is available?  What is the Syntax?  I think it’s a good question so it’s time to write up a quick post about it.</p>
<p>First off, I would start with actually building your site.  Come up with a need.  Start with something simple and something that you already have data for.  I found that trial and error on real problems is the best way for me to learn a new language.</p>
<p>Most likely, if you’re trying to do something simple, there is already an example of how to do it in <a title="DotCMS Demo Site." href="http://demo.dotcms.org" target="_blank">DotCMS’s Demo Site</a>.  The username/password is:  test@dotcms.org/test.  Remeber to put a /c after the host to get to the login page.  I’ve found that most of my questions can be answered just by looking a good example.</p>
<p style="text-align: left;">From there my next stop is the <a title="DotCMS's Velocity Documentation" href="http://www.dotcms.org/documentation/?folderPath=/community/documentation/documentation_repository/velocity/" target="_blank">documentation that DotCMS has on velocity</a>:</p>
<ol>
<li><a title="Velocity and the DotCMS" href="http://www.dotcms.org/community/documentation/documentation_repository/velocity/Velocity_and_the_dotCMS.txt" target="_blank">Velocity and the dotCMS</a>:  This is a great file to find out what API’s or ViewTools that are avilable in your Velocity code.  For example:  If you wanted to use the EscapeTool, you would use the variable $esc in your code.  I show you in a bit how to find out what is available in each tool.</li>
<li><a title="Velocity Cheat Sheet" href="http://www.dotcms.org/community/documentation/documentation_repository/velocity/Velocity-Cheat-Sheet.txt" target="_blank">Velocity Cheat Sheet</a>:  This file has several nice examples on how to use the various Macros and ViewTools available in DotCMS.  I find a lot of my answers about how to do something in DotCMS here.</li>
<li><a title="Macros Tips &amp; Tricks" href="http://www.dotcms.org/community/documentation/macros-tips-and-tricks.dot" target="_blank">Macros Tips and Tricks</a>:  The nice thing about velocity coding is that you don’t really have to know how to do it to take advantage of it.  That’s where macros come in to play.  Macros take a whole ball of velocity code and wrap it up into one nice little line of code.  (Just noting here that you can get some good examples of velocity coding in the macros file:  /dotCMS/WEB-INF/velocity/*.vm)</li>
</ol>
<p>If you really cannot find what you are looking for in that, the next step would be to look in the <a title="Dotcms API." href="http://dotcms.org/api" target="_blank">API docs</a>.  Now, if you’ve never looked at Javadocs before this might be a little overwhelming at first.  But, I find it extremely useful when I am trying to do something out of the box.  Browse to <a title="DotCMS API" href="http://dotcms.org/api" target="_blank">http://dotcms.org/api</a>.  From there scroll down the list and click on the “<a title="DotCMS Viewtools API" href="http://dotcms.org/api/com/dotmarketing/viewtools/package-summary.html" target="_blank">View Tools</a>” class (com.dotmarketing.viewtools).  From there you will get a list of all the api’s that DotMarketing has created.</p>
<p>That’s nice if what you want is a list of DotCMS’s View Tools, but if you are looking for the built in stuff,  head over to <a title="Apache's Velocity Site." href="http://velocity.apache.org/" target="_blank">Apache’s Velocity Site</a> and click on the <a title="Velocity Tools" href="http://velocity.apache.org/tools/releases/1.4/" target="_self">Tools</a> link.  From there click on Generic Tools and then the specific tool that want to look up.</p>
<p>I hope that helps to get new users up and going with velocity.  If you still feel very confused, here is a lit of other resources that you might find handy:</p>
<ul>
<li>Apache has a nice <a title="Velocity User's Guide." href="http://velocity.apache.org/engine/devel/user-guide.html" target="_blank">Velocity user’s guide</a>.</li>
<li>If you want to start developing your own ViewTools, check out the <a title="Velocity Developer's Guide" href="http://velocity.apache.org/engine/devel/developer-guide.html" target="_blank">Developer’s guide</a>.</li>
<li><a title="VTL Reference Guide" href="http://velocity.apache.org/engine/devel/vtl-reference-guide.html" target="_blank">Velocity Template Language Reference Guide</a>.</li>
<li>(more to come as I find them).</li>
</ul>
<p><em>Update: 1:12 PM, July 23, 2008:</em></p>
<p>Jim S. over in the DotCMS IRC group pointed out a velocity mailing list:  <a title="Velocity News Group" href="http://www.nabble.com/Velocity---User-f347.html" target="_blank">http://www.nabble.com/Velocity—User-f347.html</a>.  Thanks Jim!</p>
<p>Also, that brings up a good point.  We have a core group of DotCMS-er’s over in the #dotcms IRC chatroom.  Feel free to jump on board and ask us your questions! We are on freenode.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cfalzone.com/blog/2008/08/vlocity-in-dotcms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
