Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » InPath & Active problems on eCom navigation

InPath & Active problems on eCom navigation

Heine Virenfeldt Kristensen
Heine Virenfeldt Kristensen
Reply

We have a site where templates is made with the new viewmodels, and here we have a issue with InPath & Active in the ecom navigation. Have attached two xml files, from the topmenu and from the sidebar. In the sidebar InPath & Active works fine, but in the topmenu it is always False. Any idea why?

Solution is running DW 9.2.17


Replies

 
Nicolai Pedersen
Reply

Hi Heine

Just tested this locally on 9.2 and it seems to be working alright (see dump). I can see from the code that the inpath property is depending on the product catalog module has been executed before your navigation is executed. So could you somehow have an implementation that either does not render the catalog module or renders the navigation early in the process?

BR Nicolai

Capture.PNG
 
Heine Virenfeldt Kristensen
Heine Virenfeldt Kristensen
Reply

Hi Nicolai

We have navigation that renders early in the process, but that worked fine, with the old template model.

 
Nicolai Pedersen
Reply

Hi Heine

Oh, yes - the viewmodels! What happens is that you call Placeholder() and/or GetPageContent() from the viewmodel - when you do that, we render the content of the page at the call time of that method. When using old fashioned templates, the tag is filled 'optimistic'. That means that because your top navigation is executed after the template instance has been filled with the paragraph and module output, and the catalog module therefore has been executed, it works. In the view model, you navigation tag is before your call to placeholder, causing this issue... Not an easy to understand explanation.

So - try to move you top navigation call to after the Placeholder()/GetPageContent() calls and see if that fixes the inpath.

Also I would like to see the template so I can reproduce the issue.

We will then find you a solution.

BR Nicolai

 
Heine Virenfeldt Kristensen
Heine Virenfeldt Kristensen
Reply

Hi Nicolai,

Our template is bloated with our own tags as well so I would have to either clean it up or send you the whole solution. I think it would be easiest if you simply insert the navigation tag in your own demo solution so you can identify the issue :)

BR Heine

 

You must be logged in to post in the forum