Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document the Orchard focused HtmlHelper extension methods #250

Open
rtpHarry opened this issue Feb 11, 2016 · 0 comments
Open

document the Orchard focused HtmlHelper extension methods #250

rtpHarry opened this issue Feb 11, 2016 · 0 comments

Comments

@rtpHarry
Copy link
Contributor

I was just digging around looking for best practices and I've found about five different ways that Orchard handles creating links like, for example the edit link:

<a href="@Url.Action("Edit", new {commentEntry.Comment.Id})" title="@T("Edit")">@T("Edit")</a>@T(" | ")

@Html.ActionLink(T("Edit").ToString(), "Edit", new {name = tenant.Name, area = "Orchard.MultiTenancy"}) 

@Html.ActionLink(T("Edit").Text, "Edit", "Admin", new { area = "Contents", id = Model.CurrentMenu.Id, returnUrl = Url.Action("Index") }, new { @class = "button" })

@Html.ItemEditLink(T("Edit").Text, contentItem)@T(" | ")

@Html.ItemEditLink(T("Edit").Text, termEntry.ContentItem, new { returnUrl = Url.Action("Index", "TermAdmin", new { taxonomyId = Model.Taxonomy.Id }) }) |

@Html.ItemEditLinkWithReturnUrl(T("Edit").Text, contentItem)

The last two caught my eye as they seem to be the standardised ones built in to the Orchard Framework but they aren't widely known and used.

This page should be written a reference guide rather than a tutorial. Just explain each method in plain language, describe its parameters and give a usage example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant