Pregunta

Tengo un sitio web que genera los menús de navegación basado en los niveles de acceso de usuario. Los servicios web y utiliza el código XSLT para obtener los datos y la transforman en el navegador.

Ahora quiero exportar este sitio a un CMS libre disposición, ¿Puede alguien sugerir un CMS en el que esta funcionalidad está incorporada. Me gustó mucho Orchard, pero soy incapaz de conseguir que esto funcione.

Gracias a todos por su tiempo y las sugerencias.

¿Fue útil?

Solución

I guess you won't find any CMS that would have something like this built-in and wouldn't involve some coding to make it work.

It would be fairly easy to add such functionality in Orchard, though. The only two things you'd have to do would be:

  1. Create an Orchard module (which can be autogenerated via command-line)
  2. Create a class in your module project that implements INavigationProvider interface. There is only a single method to override that returns the menu items collection (properly hierarchized via Parent <-> Items properties). All the custom item-retrieval logic should happen right here. There is also a MenuName property to override - this should return the name of a generated menu (can be pretty much anything).

And basically that is all - compile the solution and enable your module feature via Dashboard -> Modules -> Features.

To display the menu you could use the Advanced Menu module. After installing and enabling this feature you can drop the MenuWidget (or StyledMenuWidget if you want a simple, pre-styled menu) to any Zone you want (you can do it from Dashboard -> Widgets). When doing that you'd be asked for the name of the menu to render. Provide the name your INavigationProvider's MenuName property returns.

HTH

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top