I have created my navigation menus in Orchard using a mix of Content Item
and Custom Link
Elements (parts of the website are outside the scope of the CMS). Now there are a couple of links that I need to open in a new window/tab, basically the target="_blank"
behaviour.
SInce the original Custom Link
does not have any parameters I tried to create an extended version of it. In the admin backend I went to "Content definition" looked up Custom Link
and tried to create a copy of it, then add a target
field that I could check for and use in my theme's Menu.cshtml
file.
However I can't even get the basic carbon copy of the Custom Link
item working. It has the same stereotype, same Parts, same Forms (none) as the original Custom Link
, and it does appear in the list of items on the admin -> navigation window. However the item does not have a field for the URL/link. It only has the field for Menu Text, nothing else.
So my question is 2-tiered:
- How can I get a carbon copy of the
Custom Link
item type working in my Orchard backend navigation? - When I have my copy of the
Custom Link
working and add a text field namedtarget
, how can I access its value in theMenu.cshtml
view?
(I tried simply adding a URL field to my copy, that would then show up in the navigation editor, however the navigation itself would ignore it in the output and create a link to the content item id instead).
Any help is greatly appreciated!
Edit: Here are some screenshots to better illustrate the problem, maybe they can help pin down the problem.