`How to display a different sidebar in different sections using PdoMenu?
D
D
Daniel2017-08-30 15:09:24
CMS
Daniel, 2017-08-30 15:09:24

How to display a different sidebar in different sections using PdoMenu?

There is a chunk with a sidebar, inside a PdoMenu call for the sidebar.

<div class="sidebar-menu">
[[pdoMenu?
  &level=`1`
  &parents=`7`
        &tplOuter=`@INLINE <ul>[[+wrapper]]</ul>` 
        &tplParentRow=`@INLINE <li><a href="[[+link]]" [[+classes]]>[[+menutitle]]</a>[[+wrapper]]</li>`
        &tpl=`@INLINE <li><a href="[[+link]]" [[+classes]]>[[+menutitle]]</a></li>`
]]
</div>

Now in each section it displays the same subsections in the sidebar.
But I need to display different sidebars in each section, depending on the site tree.
It is possible to prescribe PdoMenu with the necessary resource ID for each section, but this is probably wrong.
How can this be implemented?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
D
display: block, 2017-08-30
@baevdantes1993

I can't tell without the structure of the site.
But if it is simple on two levels, for example,
then you can specify a parameter in the snippet
If the structure is a little deeper, you need to write a small snippet that would give out the section id.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question