C
C
Cesare Borgia2014-02-03 15:50:45
PHP
Cesare Borgia, 2014-02-03 15:50:45

Sidebar on MODX Revolution?

I have a sidebar. It contains headings. According to the TOR, I need to make sure that when I enter a rubric, a subcategory is displayed in the sidebar under my rubric. When I navigated to a subcategory, the sidebar remained the same, but with the current link styled. In all other places, the sidebar does not change.
I'm doing this with getResources and was thinking about using UltimateParent, but I don't know how to write everything correctly.
Sidebar chunk that displays categories:

<div class = 'sidebar'>
  <ul class = 'info-line'>	
  	
  </ul>
</div><!--sidebar-->

It works as it should, but the chunk for displaying subcategories ... there are problems with it.
According to my plan, UltimateParent checks if our current id has a parent = 2, then we output. But MODX has its own notation, and I haven't quite figured it out yet.
<li>
  <a href = ""></a>
  

</li>

This code doesn't work because I can't write the conditions for withdrawal correctly.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Cesare Borgia, 2014-02-03
@Borgia

I did it through Wayfinder, everything turned out to be very simple, but as always, you don’t come to this right away.

<div class = 'sidebar'>
  <ul class = 'info-line'>	
  	
  </ul>
</div><!--sidebar-->

No "super" designs. As easy as pie.

A
Alexander Gorsky, 2014-02-03
@alcanoid

In general, Wayfinder copes well with the formation of the menu - have you tried it, or have you fundamentally abandoned it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question