yeah I get the concept of chunks... i’ve seen them before called various different things on other CMS’s.... but how does that benefit my use of the navigation "class"?
and finally, I was wondering off-topic as well how would one go about inserting PHP blocks into a MODx page?
sorry about all of the questions... i’m just conforming to a new CMS is all... and only have a few minor questions, as most things are available from other CMS’s
-
☆ A M B ☆
- 24,524 Posts
Snippets = PHP blocks. You can also have PHP code in TVs, but that’s best left for later and better understanding of everything else.
You use a chunk to specify how you want each part of your menu to look. There is a chunk for the outer container (if you’re using an unordered list, it will have the <ul> ... </ul> tags). There is a chunk for each line item. There is a chunk for the header if you want one (made from the menu title of the parent document specified). If you
download the Ditto documentation and look over the default templates you’ll see how you can manage the ouput of every part of your menu.
-
☆ A M B ☆
- 24,524 Posts
You named it literally "&parentRowTpl=`cssplay_parentRow`"?
yes, i’m a damn fool... and just was messing around with it.
chances are they should be named whats inside the quotations, correct?
EDIT: I renamed them to what was in the ’’s and my navigation still doesn’t work.... what the hell do i have to do? I just /Epic Phail/ i think. please help
-
☆ A M B ☆
- 24,524 Posts
Copy/paste your exact snippet call, and the exact content of your chunks. It’s 1:30 here, but if I fade out I’m sure somebody will be able to look at it and see what’s going on.
Those aren’t quote marks, they are backticks. Don’t even start getting in the habit of thinking of them as quote marks; that’s probably the most common beginner mistake in working with snippets!
alright... in my template that is used on pages... heres the call for the navigation...
[[Wayfinder? &startId=`0` &level=`3` &parentClass=`hide` &parentRowTpl=`cssplay_parentRow` &outerTpl=`cssplay_outer` &innerTpl=`cssplay_inner` &rowTpl=`cssplay_row` &outerClass=`menu` &cssTpl=`cssplay_basicdd`]]
here are my chunks... (title is bolded... content below it... seperated by line break)
cssplay_basicdd
<link rel="stylesheet" media="all" type="text/css" href="assets/templates/wayfinder/basic_dd.css" />
<!--[if lte IE 6]>
<link rel="stylesheet" media="all" type="text/css" href="assets/templates/wayfinder/basic_dd_ie.css" />
<![endif]-->
cssplay_inner
<ul>
[+wf.wrapper+]
</ul>
cssplay_outer
<div[+wf.classes+]>
<ul>
[+wf.wrapper+]
</ul>
</div>
cssplay_parentRow
<li><a [+wf.classes+] href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>
<!--[if lte IE 6]>
<a class="sub" href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]
<table><tr><td>
<![endif]-->
[+wf.wrapper+]
<!--[if lte IE 6]>
</td></tr></table>
</a>
<![endif]-->
</li>
cssplay_row
<li[+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>
so whats the issue?