Developer forum

Forum » Templates » Navigation with razor - example and documentation

Navigation with razor - example and documentation

Martin Kristensen
Reply

I'm looking for some documentaion and an example of how to create a navigation with razor, instead of xslt?

Been looking on GitHub, but could not find any examples of how to create a navation with razor, with some documentaion on how to do it. Is this possible to find somewhere? Maybe even a video toturial of how do it?

 

Kind regards Martin


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Martin

There is no native navigation implementation for Razor available. So XSLT is the same approach to use in Razor layouts.

But you can use the API though, using Frontend.Page object. But it is not very developer friendly. This example code https://github.com/dynamicweb/dwtc15/blob/master/mri/Files/Templates/Designs/lib/razor/functions/functions.cshtml has a lot of coding against the page tree, and can be used for navigations in Razor

BR Nicolai

 
Mikkel Toustrup Olsen
Reply

Hi Nicolai,

Is there, as of today, still not an example of a native razor navigation file? :-)

BR Mikkel

 
Nicolai Pedersen
Reply

No news yet - but in the works....

BR Nicolai

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

+1 for that

 
Morten Lund
Morten Lund
Reply

+1 !

 
António Ramos
António Ramos
Reply

+1

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

+1

 
Mikkel Toustrup Olsen
Reply

Hey Nicolai,

Still no news regarding razor navigation? :)

BR Mikkel

 
Mikael Conley
Mikael Conley
Reply

Hi.

I really want to implement navigation with razor for our new project.
The release notes for 9.3 say: "...view models for the cart and navigation mean a goodbye to XSLT (score!)."
I have looked like crazy for a navigation viewmodel but can't find it anywhere.

Please give us some info we can use!

 
Nicolai Pedersen
Reply

This has not yet been released because of technical difficulties related to URLs and performance on ecommerce groups.

I am sorry about that - it is awaiting a fix so it can be wrapped on in a version suitable for production use.

BR Nicolai

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

Any news on the Razor menus (documentation)?

 

We could really use it.

 

Best Regards,

Nuno Aguiar

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

Any news on the Razor menus?

 

Best Regards,

Nuno Aguiar

 
Justin Breg
Reply

Hi,

Any news?

 
Gaëtan Di Caro
Reply

Eagerly waiting for that too here :)

 
Jens Mouritzen
Jens Mouritzen
Reply
+1
 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

+1 (again)

 
Lars Larsen
Lars Larsen
Reply

+1

 
Jens Mouritzen
Jens Mouritzen
Reply

+1

 
Aki Ruuskanen
Aki Ruuskanen
Reply

+1

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

+2

 
Jens Mouritzen
Jens Mouritzen
Reply

+3

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

+4

 
Lars Larsen
Lars Larsen
Reply

No pressure wink

 

You must be logged in to post in the forum