Got a couple of issues that I have been strugling with in Modx 2.3.1
Issue 1.
I was trying to build a Mega Menu with 2 types of drop downs and defined a tv called menu_type with the following values: Dropdown==1||Megamenu==2. Some pages needed a multi-column menus while others looked better with a simple drop down list.
Then i used out put filter to insert the correct class like so:
[[+menu_type:eq=`1`:then=`dropdown`:else=`mega-menu-item`]]
The problem is that [[+menu_type]] had a proper value in &rowTpl chunk but not in &innerTpl chunk. Since innerTpl should be called on the same level as the row item i don't understand why tv placeholder lost its value.
Any ideas hot to make WF not loose placeholder value in the same iteration?
Issue 2.
Trying to build an accordion with a 2 level wayfinder call i needed to use wf.id to uniquely mark accordion panels.
Here's &rowTpl html:
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title [[+wf.classnames]]">
<a href="#[[+wf.id]]" data-toggle="collapse" data-parent="#accordion2">
<i class="fa fa-medkit"></i>[[+wf.linktext]]<i class="fa fa-angle-down pull-right"></i>
</a>
</h4>
</div>
<div id="[[+wf.id]]" class="panel-collapse collapse [[+wf.classnames:eq=`active`:then=`in`]]">
<div class="panel-body">
[[+wf.wrapper]]
</div>
</div>
</div>
According to Wayfinder rtfm page:
wf.id - outputs a unique ID attribute. You will need to specify the &rowIdPrefix parameter in order for this placeholder to receive a value. The value is your prefix + the docId.
So i expected to get just prefix1234, but instead [[+wf.id]] output id="prefix1234". This is unexpected and undesired behavior. It should be up to the template to specify which attribute to insert the id value into.
[ed. note: outre99 last edited this post 9 years, 8 months ago.]