Skip to content

Commit 88c7973

Browse files
Fix the documentation links, newest version doesn't link to docs with version number in
1 parent 3b14abc commit 88c7973

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

OurUmbraco.Site/Views/Download.cshtml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,17 @@
9898
<span class="version-number">Umbraco @release.FullVersion.Major @(release.IsLts ? Html.Raw("<span class=\"version-number-badge\"><abbr title=\"Long-term support - 3 years of maintenance and security updates\">LTS</abbr></span>") : null)</span>
9999

100100
<div class="large-margin-bottom">
101-
<a class="button green cta-button" href="https://docs.umbraco.com/umbraco-cms/v/@(release.FullVersion.Major).latest@(release.IsLts? "-lts" : null)/fundamentals/setup/install">Show install guidance</a>
101+
@{
102+
// if it's not the newest version then the links to the docs need a versio number to be added
103+
var addVersionToDocumentationLinks = release != downloadReleases.OrderBy(x => x.FullVersion).Last();
104+
var infix = "";
105+
if (addVersionToDocumentationLinks)
106+
{
107+
infix = release.FullVersion.Major + ".latest/";
108+
}
109+
}
110+
111+
<a class="button green cta-button" href="https://docs.umbraco.com/umbraco-cms/@(infix)fundamentals/setup/install">Show install guidance</a>
102112
</div>
103113

104114
<span class="version-release-date">Released: @release.ReleaseDate.ToString("MMMM d, yyyy")</span>

0 commit comments

Comments
 (0)