<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Building a Website with MODx for Newbies &#8211; Part 4: Introducing Chunks</title>
	<atom:link href="http://codingpad.maryspad.com/2009/04/02/building-a-website-with-modx-for-newbies-part-4-introducing-chunks/feed/" rel="self" type="application/rss+xml" />
	<link>http://codingpad.maryspad.com/2009/04/02/building-a-website-with-modx-for-newbies-part-4-introducing-chunks/</link>
	<description>Programming blog - Discussions, Tutorials, Resources</description>
	<lastBuildDate>Sun, 21 Mar 2010 06:56:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Devina</title>
		<link>http://codingpad.maryspad.com/2009/04/02/building-a-website-with-modx-for-newbies-part-4-introducing-chunks/comment-page-1/#comment-9168</link>
		<dc:creator>Devina</dc:creator>
		<pubDate>Mon, 15 Mar 2010 23:58:36 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=556#comment-9168</guid>
		<description>I am learning MODx now, thank you for your tutorial +_+</description>
		<content:encoded><![CDATA[<p>I am learning MODx now, thank you for your tutorial +_+</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mary</title>
		<link>http://codingpad.maryspad.com/2009/04/02/building-a-website-with-modx-for-newbies-part-4-introducing-chunks/comment-page-1/#comment-9073</link>
		<dc:creator>mary</dc:creator>
		<pubDate>Tue, 16 Feb 2010 01:02:30 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=556#comment-9073</guid>
		<description>Yes they do! :) And they allow you a lot of freedom when templating and organizing your content.</description>
		<content:encoded><![CDATA[<p>Yes they do! <img src='http://codingpad.maryspad.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  And they allow you a lot of freedom when templating and organizing your content.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martijn Kouwenhoven</title>
		<link>http://codingpad.maryspad.com/2009/04/02/building-a-website-with-modx-for-newbies-part-4-introducing-chunks/comment-page-1/#comment-9069</link>
		<dc:creator>Martijn Kouwenhoven</dc:creator>
		<pubDate>Mon, 15 Feb 2010 18:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=556#comment-9069</guid>
		<description>Mmm, I love chunks it really helps to give you a fresh look on the code!</description>
		<content:encoded><![CDATA[<p>Mmm, I love chunks it really helps to give you a fresh look on the code!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mary</title>
		<link>http://codingpad.maryspad.com/2009/04/02/building-a-website-with-modx-for-newbies-part-4-introducing-chunks/comment-page-1/#comment-9060</link>
		<dc:creator>mary</dc:creator>
		<pubDate>Sun, 14 Feb 2010 11:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=556#comment-9060</guid>
		<description>Thomas
Regarding Ditto, are you creating chunks with templates controlling what you want to come through on Ditto? I think a tpl for this would solve your problem

For the Wayfinder with Javascript, I have seen quite a few MODx sites using javascript in the Wayfinder menu.  I strongly recommend you read through the excellent and free wayfinder ebook and especially read on the &amp;jsTpl parameter :)  Here&#039;s the link to the book download page (it&#039;s on the first post: http://modxcms.com/forums/index.php/topic,34176.0.html

I also recommend a visit to the forums.  Do some reading and ask some questions. For example:
http://modxcms.com/forums/index.php/topic,12272.msg81622.html#msg81622

I think the Wayfinder ebook will help you a lot

mary</description>
		<content:encoded><![CDATA[<p>Thomas<br />
Regarding Ditto, are you creating chunks with templates controlling what you want to come through on Ditto? I think a tpl for this would solve your problem</p>
<p>For the Wayfinder with Javascript, I have seen quite a few MODx sites using javascript in the Wayfinder menu.  I strongly recommend you read through the excellent and free wayfinder ebook and especially read on the &amp;jsTpl parameter <img src='http://codingpad.maryspad.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Here&#8217;s the link to the book download page (it&#8217;s on the first post: <a href="http://modxcms.com/forums/index.php/topic,34176.0.html" >http://modxcms.com/forums/index.php/topic,34176.0.html</a></p>
<p>I also recommend a visit to the forums.  Do some reading and ask some questions. For example:<br />
<a href="http://modxcms.com/forums/index.php/topic,12272.msg81622.html#msg81622" >http://modxcms.com/forums/index.php/topic,12272.msg81622.html#msg81622</a></p>
<p>I think the Wayfinder ebook will help you a lot</p>
<p>mary</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://codingpad.maryspad.com/2009/04/02/building-a-website-with-modx-for-newbies-part-4-introducing-chunks/comment-page-1/#comment-9059</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Sun, 14 Feb 2010 07:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=556#comment-9059</guid>
		<description>Hi Mary,  I am just a little slow in responding as I have been to the dark side and back.  

After doing a number things from  changing templates to putting the javascript in the the template, I started to tear things apart/out one by one. What I found were  some serious conflicts with the templates in Wayfinder.  Normal content was fine but when I started to include things that had javascript that&#039;s when things would break down.   The template calls in the snippet were the conflict--I think--as when I removed them things came together.  They were &amp;parentRowTpl=`cssplay_revParentRow` &amp;cssTpl=`cssplay_revFlyOut`.  I was only using the &quot;flyout&quot; to one level.  But using this code from template to template was causing the problem.  

I also found that on a resource if I just had pictures or pictures and just a very small amount of content prior to the picture and javascript, these would come through on the Ditto page and crash the Ditto.  

I look at Modx as being an extremely powerful platform, and yet I saw/see these challenges  as a barrier that once committed  I would struggle with all the time.  Simple content all went fine, but I wanted to test a few more things to see how I would handle these.  

Also, and though this has more to do with snippets and not sure if technically possible, it would be nice if when creating a resource/document you could choose to turn on or off the Modx API on that particular resource and allow for Inline PHP.  That would be powerful.  Maybe it is possible now and I am just not aware. 

Thank you Mary,

Thomas</description>
		<content:encoded><![CDATA[<p>Hi Mary,  I am just a little slow in responding as I have been to the dark side and back.  </p>
<p>After doing a number things from  changing templates to putting the javascript in the the template, I started to tear things apart/out one by one. What I found were  some serious conflicts with the templates in Wayfinder.  Normal content was fine but when I started to include things that had javascript that&#8217;s when things would break down.   The template calls in the snippet were the conflict&#8211;I think&#8211;as when I removed them things came together.  They were &amp;parentRowTpl=`cssplay_revParentRow` &amp;cssTpl=`cssplay_revFlyOut`.  I was only using the &#8220;flyout&#8221; to one level.  But using this code from template to template was causing the problem.  </p>
<p>I also found that on a resource if I just had pictures or pictures and just a very small amount of content prior to the picture and javascript, these would come through on the Ditto page and crash the Ditto.  </p>
<p>I look at Modx as being an extremely powerful platform, and yet I saw/see these challenges  as a barrier that once committed  I would struggle with all the time.  Simple content all went fine, but I wanted to test a few more things to see how I would handle these.  </p>
<p>Also, and though this has more to do with snippets and not sure if technically possible, it would be nice if when creating a resource/document you could choose to turn on or off the Modx API on that particular resource and allow for Inline PHP.  That would be powerful.  Maybe it is possible now and I am just not aware. </p>
<p>Thank you Mary,</p>
<p>Thomas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mary</title>
		<link>http://codingpad.maryspad.com/2009/04/02/building-a-website-with-modx-for-newbies-part-4-introducing-chunks/comment-page-1/#comment-9049</link>
		<dc:creator>mary</dc:creator>
		<pubDate>Fri, 12 Feb 2010 15:56:09 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=556#comment-9049</guid>
		<description>Thomas
AFAIK you don&#039;t need to have the base href in your chunks as long as it&#039;s in the head of your template.

What happens if you just place your javascript directly in the template without using a chunk? Does it work? 

mary</description>
		<content:encoded><![CDATA[<p>Thomas<br />
AFAIK you don&#8217;t need to have the base href in your chunks as long as it&#8217;s in the head of your template.</p>
<p>What happens if you just place your javascript directly in the template without using a chunk? Does it work? </p>
<p>mary</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://codingpad.maryspad.com/2009/04/02/building-a-website-with-modx-for-newbies-part-4-introducing-chunks/comment-page-1/#comment-9043</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Tue, 09 Feb 2010 23:18:47 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=556#comment-9043</guid>
		<description>I guess code does not show in a post so I put a link to it here:
http://www.mcleroy.org/maryspad.php

Thank you.</description>
		<content:encoded><![CDATA[<p>I guess code does not show in a post so I put a link to it here:<br />
<a href="http://www.mcleroy.org/maryspad.php" >http://www.mcleroy.org/maryspad.php</a></p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://codingpad.maryspad.com/2009/04/02/building-a-website-with-modx-for-newbies-part-4-introducing-chunks/comment-page-1/#comment-9042</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Tue, 09 Feb 2010 23:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=556#comment-9042</guid>
		<description>Hi Mary,  I have two Chunk related questions in my study of Modx Chunks.

First, might it be important to have the html base reference -  in a chuck or is that just inherited from the template?

Second, I have a bit of code that contains Javascript.  And I think that chucks are the proper place for this.  I run this code outside of Modx Evo and works fine.  I put it into a chunk and then call the chunk in my document and no errors but  just a blank page.   

Here is the code:




function kw_switch(i,c) {
	d=document;if (d.getElementById){ d.getElementById(&#039;kwMain&#039;).src=i;
	d.getElementById(&#039;kw_caption&#039;).innerHTML=unescape(c);}
}





  
    
        
          &lt;a href=&quot;;&quot;&gt;&lt;/a&gt;
        
        
          &lt;a href=&quot;;&quot;&gt;&lt;/a&gt;
        
        
          &lt;a href=&quot;;&quot;&gt;&lt;/a&gt;
        
      
    
    
  
  
    Packers Football
    
  


 

To check myself,  I also tried to call the page that works outside of Modx with [!ShowStaticHtmlPages?dir=`assets/docs`&amp;index=`picturegallery.htm`!]

In this case the images appear but no functionality.  I also disabled Quick Editor to make sure there were not conflicts there.  

If you have any thoughts I would appreciate them.   Thank you.</description>
		<content:encoded><![CDATA[<p>Hi Mary,  I have two Chunk related questions in my study of Modx Chunks.</p>
<p>First, might it be important to have the html base reference &#8211;  in a chuck or is that just inherited from the template?</p>
<p>Second, I have a bit of code that contains Javascript.  And I think that chucks are the proper place for this.  I run this code outside of Modx Evo and works fine.  I put it into a chunk and then call the chunk in my document and no errors but  just a blank page.   </p>
<p>Here is the code:</p>
<p>function kw_switch(i,c) {<br />
	d=document;if (d.getElementById){ d.getElementById(&#8217;kwMain&#8217;).src=i;<br />
	d.getElementById(&#8217;kw_caption&#8217;).innerHTML=unescape(c);}<br />
}</p>
<p>          <a href=";"></a></p>
<p>          <a href=";"></a></p>
<p>          <a href=";"></a></p>
<p>    Packers Football</p>
<p>To check myself,  I also tried to call the page that works outside of Modx with [!ShowStaticHtmlPages?dir=`assets/docs`&amp;index=`picturegallery.htm`!]</p>
<p>In this case the images appear but no functionality.  I also disabled Quick Editor to make sure there were not conflicts there.  </p>
<p>If you have any thoughts I would appreciate them.   Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
