Answer the question
In order to leave comments, you need to log in
`
How to make an if condition in modx to display a menu?
There is a piece of code that displays a menu (if any)
[[pdoMenu?
&parents=`2`
&level=`1`
&where=`{"template":4}`
&tplOuter=`@INLINE <ul>[[+wrapper]]</ul>`
&tpl=`@INLINE <li><a[[+classes]] href="[[+link]]" [[+attributes]]>[[+menutitle]]</a>[[+wrapper]]</li>`
]]
Answer the question
In order to leave comments, you need to log in
[[!pdoMenu:default=`<p>вывести этот текст вместо пустого меню</p>`?
&parents=`2`
&level=`1`
&where=`{"template":4}`
&tplOuter=`@INLINE <ul>[[+wrapper]]</ul>`
&tpl=`@INLINE <li><a[[+classes]] href="[[+link]]" [[+attributes]]>[[+menutitle]]</a>[[+wrapper]]</li>`
]]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question