hofff / contao-content-navigation

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

Feature request: Add an event or hook in ContentNavigationBuilder->collect() #20

Open Defcon0 opened 3 years ago

Defcon0 commented 3 years ago

Hello,

at first thanks for the great plugin. It works like a charm :+1:

Only one thing bothers me. I use https://github.com/heimrichhannot/contao-news-pagination-bundle which generates a pagination (automatically based on character length or manually based on wrapper content elements) in the parseArticles hook.

Hence the links would also need to respect the generated pagination. So I need to adjust the links generated in ContentNavigationBuilder->collect().

A hook or event would be enough for that.

Would that be an option? I could also create a PR for an event dispatch if you like. At the moment I need to override the content element or create a parseTemplate hook which is not very precise since I need to check for the template name.

Thanks in advance!

Bye Defcon0

dmolineus commented 2 years ago

Feel free to provide an PR for that. Please use an event insteadof a hook for it.