We have been stuck on this for a while and what ever we try does not seem to work and apparently this is not an Umbraco v8 bug. Although Umbraco will not tell us how to do this?? We are new to umbraco and working in Umbraco cloud v8.
We are trying to add anchor links to a dynamic menu. Our client creates the anchor link with the anchor link tool.
We thentry and add the link to the dynamic menu.
This should give us the path /services#communication, but we get the following services/communication and therefore does not work.
which works for the drop down menu, but now the top menus if they do not have a drop down have the "services#" in front of the path so they do not work.
ie our about us link is now /services#aboutus where it should be /aboutus.
It's not exactly clear what you are trying to achieve. Your render page link code is in no way connected to the list of anchor links you are creating. I think you should also show us the @RenderChildren() method code. Also can you show us the example of content that has the dynamic links?
Reading your helper method it says
if not disable dropdown + has children
then render dropdown html
and pass the children into a RenderChildren helper method
else
render out node name and url
There is no code there, that says access a property on my node that has a list of the in-page dynamic links.
As i say, show us all of the code, tell us exactly what you are trying to achieve and give us the structure of the documents you have set up, then I am sure I can help you out.
dynamic menu with anchor links
We have been stuck on this for a while and what ever we try does not seem to work and apparently this is not an Umbraco v8 bug. Although Umbraco will not tell us how to do this?? We are new to umbraco and working in Umbraco cloud v8.
We are trying to add anchor links to a dynamic menu. Our client creates the anchor link with the anchor link tool.
We thentry and add the link to the dynamic menu.
This should give us the path /services#communication, but we get the following services/communication and therefore does not work.
Our dynamic menu code is below
Can someone point us in the right direction. This should be simple to achieve so we are missing something obvious.
Mark,
This problem sounds familiar to me. As I recall, the problem has something to do with MVC Razor. Have you tried Encoding the URL's?
Thanks Graham
We tried
and derivatives of
to try and force the "#" but unfortunately no change. we still get services/communication where we need services#communication.
We can do this manually but then our client will not be able to add anchors when they want.
This is the only CMS we have used that seems to have an issue with this simple task.
Ok, I am nearly there. I have added this
which works for the drop down menu, but now the top menus if they do not have a drop down have the "services#" in front of the path so they do not work.
ie our about us link is now /services#aboutus where it should be /aboutus.
Does any one have any ideas?
It's not exactly clear what you are trying to achieve. Your render page link code is in no way connected to the list of anchor links you are creating. I think you should also show us the @RenderChildren() method code. Also can you show us the example of content that has the dynamic links?
Reading your helper method it says if not disable dropdown + has children then render dropdown html and pass the children into a RenderChildren helper method else render out node name and url
There is no code there, that says access a property on my node that has a list of the in-page dynamic links.
As i say, show us all of the code, tell us exactly what you are trying to achieve and give us the structure of the documents you have set up, then I am sure I can help you out.
What happens if you write the link using @HTML.Raw()?
is working on a reply...