Hi all!
I am wondering how to do to insert vaarious "content" snippets in one page adn how to deal with it ? ... could not find what terms to use in the search so sorry if question has already been asked...
I’m afraid I can’t tell exactly what your question is. Take a look at the site in my sig and see if that helps you.
Snippets are bits of PHP code (that sometimes produce bits of content, but not always). Chunks are almost always reusable bits of content (so that might answer your question). Template variables can also be bits of content.
thanks for your quick reply... what I mean is for instance I have 2/3 div in a template and I want to put different content in each div... how would I do that , as when creating a resource there is no formating and content only goes where we put the snippets...hope it’s a bit clearer...many thanks
There are a number of ways to do that, but the easiest is probably to use a template variable for each div’s content.
Say you have three divs and three TVs called tv1, tv2, and tv3.
The template would look something like this:
<div>
[*tv1*]
</div>
<div>
[*tv2*]
</div>
<div>
[*tv3*]
</div>
-
☆ A M B ☆
- 24,524 Posts
And if you don’t want the main "content" field any more, you can use ManagerManager to hide the main content field for that document.
thanks for your help .. but what kind of snippets or chunk is tv ? Many thanks
Quote from: ptityop at Apr 24, 2010, 04:15 PM
thanks for your help .. but what kind of snippets or chunk is tv ? Many thanks
Neither. Snippets, chunks, and template variables are three different things.
http://wiki.modxcms.com/index.php/Template_Variable
http://www.sottwell.com/how-template-variables-work.html
http://svn.modxcms.com/docs/display/MODx096/What+are+Template+Variables