Method Html.FrontHtml().PageLink(string,string) should not render attribute 'target' when none is specified.
When using the method:
@Html.FrontHtml().PageLink(item.LinkText, item.FullName)
The HTML output fails the W3C validator service with the following message:
Bad value for attribute target on element a: Browsing context name must be at least one character long.
Basically it should not include 'target=""' if a target is not specified.
Problem exists in V4.3.7.212
Can anyone tell me where I can find documentation on the @Html.FrontHtml().PageLink?
It is only referenced in the view documentation but there is no separate doc page for these functions http://wiki.kooboo.com/?wiki=Views
The source where the function is defined is here: https://github.com/Kooboo/CMS/blob/8bf0d36a35b937d114e93ce980cdb4ca9dcaaf97/Kooboo.CMS/Kooboo.CMS.Sites/View/FrontHtmlHelper.cs
What do you want to know about it?
On FrontHtmlHelper.cs on line 946
This should code:
if (page != null && page.Route != null)
{
builder.MergeAttribute("target", page.Route.LinkTarget.ToString());
}
Should be:
if (page != null && page.Route != null && !page.Route.LinkTarget.ToString().IsNullOrEmpty())
{
builder.MergeAttribute("target", page.Route.LinkTarget.ToString());
}
I’m interested in knowing what the method does and what the expected parameters, basic usage instructions. Are you saying that there isn’t any documentation and I need to go through source code to learn how to use the library and methods?
Larry Welch Initiatives Manager Cultura Technologies/E-Markets Office: 515-956-9310 Cell: 970-445-0794 [email protected]:[email protected] [email protected]:[email protected] http://www.e-markets.comhttp://www.e-markets.com/ http://www.culturatech.comhttp://www.culturatech.com/
CONFIDENTIALITY: This message (and attachments) may contain information proprietary to Cultura Technologies Inc. or one of its subsidiaries or affiliates and is protected by law, including the Electronic Communication Privacy Act of 1986 (18 U.S.C. 2510-21), and is intended solely for the individual or entity to whom it is addressed and shall be maintained in confidence and not disclosed to third parties without the written consent of the sender. If you are not the intended recipient, be advised that you have received this electronic mail in error and that any use, dissemination, forwarding, printing, or copying of this electronic mail is strictly prohibited. If you have received this electronic mail in error, please immediately notify the sender by return email and permanently delete this email (and all copies) from any source and destroy all printouts. Thank you for your compliance.
From: hrvoje-grabusic [mailto:[email protected]] Sent: Sunday, September 28, 2014 4:29 AM To: Kooboo/CMS Cc: Larry Welch Subject: Re: [CMS] Method Html.FrontHtml().PageLink(string,string) should not render attribute 'target' when none is specified. (#241)
It is only referenced in the view documentation but there is no separate doc page for these functions http://wiki.kooboo.com/?wiki=Views
The source where the function is defined is here: https://github.com/Kooboo/CMS/blob/8bf0d36a35b937d114e93ce980cdb4ca9dcaaf97/Kooboo.CMS/Kooboo.CMS.Sites/View/FrontHtmlHelper.cs
What do you want to know about it?
— Reply to this email directly or view it on GitHubhttps://github.com/Kooboo/CMS/issues/241#issuecomment-57081373.
There is no separate document page for this function, no. It's usage is show in this link: http://wiki.kooboo.com/?wiki=Views