Optional URLs on items
Closed this issue · 5 comments
I think the navigation should support items without links (imagine a tree structure, where you can only access leafs).
Please see the 'linkless-items' branch and see if this works for you.
Nice. Thank you! Tested it, but I think it'll need some improvements. I think it shouldn't render the a
tag, just normal text (or maybe span
ed. Also, the method should not need the url argument, but could specify it:
primary.item :justtext, 'Just text'
primary.item :justtext1, 'Just text', nil
primary.item :linkswork, 'Click me!', url
Could it be possible?
+1 for implementing this feature
me too. would like link to be optional
Hello Francisco (and +1ers!),
I've done some more work on this feature and merged into master. Just released as 3.6.0, hope it's good for you all.
The URL parameter is now optional as you requested - it is still possible to specify options without specifiying the URL (ie. you aren't forced to specify nil when wanting to specify options) as a Hash at that parameter position is interpreted as options rather than a URL. I think this provides the most flexibility and appropriate expressiveness within the DSL.
If you have any further suggestions, please don't hesitate to let me know and I'll work on them in a future release.
Cheers,
Mark.