b13 / menus

TYPO3 Extension for creating fast menus in a fast fashion
GNU General Public License v2.0
54 stars 22 forks source link

Documentation in README.md misleading #98

Closed hoermannklaus closed 1 year ago

hoermannklaus commented 1 year ago

I found out about this extension dealing with a very large menu. 5 levels down. Our old approach using HMENU generated way to many SQL queries (according to the admin panel). And using b13/menus is a game changer.

When I read through the documentation regarding the "Tree Menu" part stating "Usage in Fluid:...". The Fluid template code uses

<f:link.page pageUid="{page.uid}">{page.nav_title}</f:link.page>

In my opinion this is a overload, as the Link Page Viewhelper again produces queries, which are in this context absolutely not necessary. The "mobilemenu" from the DataProcessor already contains all necessary information (especially the "slug").

That's the reason why this is so great, you do not need any other database query, respectively ViewHelpers building your menu. I chose to use this instead

<a href="{page.slug}">{page.nav_title}</a>

The important part here is, that the "slug" is already included in the result form the DataProcessor TreeMenu. No need to use the Fluid Page Viewhelper.

In my case it works, or am I missing something?

Thanks

hoermannklaus commented 1 year ago

I found out, why my version only using anchor () tags is only half the story.

  • Using anchor tags with the slug only, works fine for the default language.
  • For all other languages, you are missing the language label in front of the slug, which comes from the site configuration.

Therefore I guess you could use the anchor tags for the default language only. All other languages need the view helper.

Generally I think hot having the full slug in the database is not so nice...