BM.GeneralLinksComponent.Kentico.MVC 13.0.52

dotnet add package BM.GeneralLinksComponent.Kentico.MVC --version 13.0.52                
NuGet\Install-Package BM.GeneralLinksComponent.Kentico.MVC -Version 13.0.52                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BM.GeneralLinksComponent.Kentico.MVC" Version="13.0.52" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BM.GeneralLinksComponent.Kentico.MVC --version 13.0.52                
#r "nuget: BM.GeneralLinksComponent.Kentico.MVC, 13.0.52"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BM.GeneralLinksComponent.Kentico.MVC as a Cake Addin
#addin nuget:?package=BM.GeneralLinksComponent.Kentico.MVC&version=13.0.52

// Install BM.GeneralLinksComponent.Kentico.MVC as a Cake Tool
#tool nuget:?package=BM.GeneralLinksComponent.Kentico.MVC&version=13.0.52                

This is a tool for Kentico Xperience 13 MVC (not Core, yet!) that provides a custom form component ready to use in widget properties dialogs where content editors can add a general link and control it's attributes, such as CSS classes and target.

enter image description here

enter image description here

🧩 Compatibility

Can be used with Kentico Xperience sites that use version 13.0.52 and higher, and are using the .NET 5 MVC development model.

βž• Installation

Using NuGet package manager console:

Install-Package BM.GeneralLinksComponent.Kentico.MVC

βš™οΈ Setup & Usage

In your widget properties class, you can use the following configurable properties:

using BM.GeneralLinksComponent;

[EditingComponent(GeneralLinksComponent.IDENTIFIER, Order = 3, Label = "Links")]
[EditingComponentProperty(nameof(GeneralLinksComponent.MaxLinks), 2)]
[EditingComponentProperty(nameof(GeneralLinksComponent.CustomCssClasses), "button button--primary;Primary Button\r\nbutton button--secondary;Secondary Button")]
[EditingComponentProperty(nameof(GeneralLinksComponent.Tabs), ContentSelectorTabs.Page | ContentSelectorTabs.Media | ContentSelectorTabs.Attachment)]
[EditingComponentProperty(nameof(GeneralLinksComponent.DefaultTab), ContentSelectorTabs.Page)]
[EditingComponentProperty(nameof(GeneralLinksComponent.PageRootPath), "/")]
[EditingComponentProperty(nameof(GeneralLinksComponent.MediaLibraryName), "CDE")]
[EditingComponentProperty(nameof(GeneralLinksComponent.MediaAllowedExtensions), ".gif;.png;.jpg;.jpeg;.pdf")]
[EditingComponentProperty(nameof(GeneralLinksComponent.AttachmentAllowedExtensions), ".gif;.png;.jpg;.jpeg;.pdf")]
public IEnumerable<GeneralLink> Links { get; set; }

You can also use the following HTML helper extension methods in your views:

@using BM.GeneralLinksComponent.HtmlHelperExtensions    

@foreach (var generalLink in Model.Links)
{
    <div>
        @Html.GeneralLink(generalLink)
    </div>

    <div>
        @using (Html.BeginGeneralLink(generalLink, "additional-css-class"))
        {
            <img src="/sample.png" alt="Sample image">
        }
    </div>
}

You can reorder the links by dragging and dropping them to the desired order in the widget properties dialog.

⌨️ Contributions, πŸ› Bug Fixes, andπŸ“œ License

Feel free to Fork and submit pull requests to contribute.

You can submit bugs through the issue list and we will get to them as soon as we can, unless you want to fix it yourself and submit a pull request!

Check the LICENSE.txt for License information

πŸ™ Acknowledgements

This add on has been built with the invaluable help of:

  • Trevor Fayas - for an excellent boilerplate for shareable components
  • Sean G Wright - for providing lots of amazing help and always willing to answer my (probably annoying!) Kentico dev questions
  • The Kentico support team (particularly Jakub Skurek) - for always speedily responding with helpful info and the amazing documentation
Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
13.0.52 288 1/14/2022

Initial release.