hofff / contao-content-navigation

Navigation for Contao.
GNU Lesser General Public License v3.0
4 stars 3 forks source link

Adding accordion to navigation is not possible #18

Open cliffparnitzky opened 5 years ago

cliffparnitzky commented 5 years ago

Currently it is not possible to add an accordion to the content navigation.

The reason is that "Wrapper start" / "Single element" has no headline. There is only a field Section headline. In general, it would definitely be very easy to use this field.

BUT: it is only a textfield. There is no possibility to define the headline level. That will result in different problems (start/stop level could not be recognized, where to add the entry in the netsted list of the output).

My current workaround is, to replace the Section headline for accordion "Wrapper start" / "Single element" with the headline field vvia DCA customization. The front end template ce_accordionStart has to be customzied as well.

Maybe this workaround is a good solution. But perhaps the is another idea.

Defcon0 commented 3 years ago

It would also be cool if the tool wouldn't be bound so hard to headlines. Not every section might have an own headline. You could solve this by adding an invisible div with an id set if no headline is present:

<div class="toc-headline" style="display: none !important;"></div>

Would that be an option?