1

Topic: Frontend Menu Creator Class

Hello,

I wrote a small "Frontend Menu Creator Class" for my website. It generates the menu with an defined array, and allows some configurations. (See Example below)

Example Screenshot
Code as Gist on GitHub

Removed because deprecated.

Sincerely,
Sam.

Last edited by SamBrishes (2017-02-25 01:17)

Plugins: pawUsers (0.1.0)
AdminThemes: Fox (0.2.2) | WinT (0.4.0)
Projects: pawGFM Filter | pawAskMe | SnickerForum | [...]

Thumbs up 0

2

Re: Frontend Menu Creator Class

Hello,

I've re-written my menu creator class, while I was working on the pawUsers plugin. It offers now the possibility to "automatically create" a menu, depending on the published pages. The "rendering" loop is now also more flexible and configurable.

But therefore it currently doesn't supports complete "menu" arrays or json encoded "menu" strings, like the version before. Perhaps I add this later, after i solved the problem with the "active parent" on shifted menu items ("shifted" in reference to the pages order).

So... it's still a "Work-In-Progress" helper class, it may contains still some bugs (next to the "active parent"), even if i didn't noticed any on my (not-so extensive) tests.

Source and Documentation as GitHub Gist

I don't know if anyone needs something like this, but if so, then feel free and try it. :D

Thanks.

Sincerely,
Sam.

Plugins: pawUsers (0.1.0)
AdminThemes: Fox (0.2.2) | WinT (0.4.0)
Projects: pawGFM Filter | pawAskMe | SnickerForum | [...]

Thumbs up +1

3

Re: Frontend Menu Creator Class

Nice work, Sam! (Or, I should say, yet more nice work! cool)

It's very well documented for any interested in trying it out. I don't have a "use case" for this at the moment, but it's great to have more solutions for these things. Thanks!

Using Wolf CMS professionally and for profit? Please consider supporting Wolf financially. Thanks!

4

Re: Frontend Menu Creator Class

David wrote:

Nice work, Sam! (Or, I should say, yet more nice work! cool)

It's very well documented for any interested in trying it out. I don't have a "use case" for this at the moment, but it's great to have more solutions for these things. Thanks!

Thanks big_smile

I use the new version already on my small blog template, if anyone want to see how it can look like. ^^

Plugins: pawUsers (0.1.0)
AdminThemes: Fox (0.2.2) | WinT (0.4.0)
Projects: pawGFM Filter | pawAskMe | SnickerForum | [...]

Thumbs up