Hot answers tagged

3

I am assuming you are using the standard (ootb) search results component. That component is using rendering variants: $site/Presentation/Rendering Variants/Search Results The default rendering variants will show the title of the page (or the display name). If you want to show extra fields, you should create your own variant that displays this data. Note ...


3

If you want control over the markup using C# then you can try something like this: <?xml version="1.0" encoding="utf-8" ?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <pipelines> <renderField> <processor patch:instead="processor[@...


3

To achieve this you have the field "Field used as link target" in the Variant Definition item. Then when you select the "wrapped" option in "Is link" field for your image variant field, it will wrap your image with the link provided in the Variant Definition And this link will have the target properties. Hope it helps.


2

SXA has some code that will copy the grid rendering parameters from the previous rendering on the placeholder that you are trying to add the component to. In this case I had a rendering on the "main" placeholder that does not have any grid rendering parameters field. This code is in Sitecore.XA.Foundation.Grid.Pipelines.ExecutePageEditorAction....


2

Depending on the approach this would require some custom development as ootb it is not possible. Since the pdfs links are shown in your pages, one solution would be to track the click event on them. You could handle this from javascript and then do an ajax call to register the page event on the sitecore side, you can take a look at a step by step approach ...


2

Take a look on the original View for OOTB Video component located under $path_to_sitecore_instance$\Views\Video\Video.cshtml: Copy those 3 highlighted lines either for Caption or Description fields: <div class="video-caption"> @Html.Sxa().Field("MovieCaption", Model.DataSourceItem, Model.GetRenderingWebEditingParams(...


2

This would be basically the same as using a CDN. There is a config file for this in App_Config/Include/Examples/CDN.config.example Basically, the settings you are looking for are: Media.AlwaysIncludeServerUrl: Ensures that all media links will always include the full server URL Media.MediaLinkServerUrl: Specifies what the server URL (including the scheme ...


2

One possible approach is to use a Promo component. There are several benefits to cloning the component but that requires discussion beyond the scope of this answer. In the example image provided you would need these fields: Image Title - single line text Text - rich text Link - one more general links Next create a rendering variant like the following: The ...


1

If it's purely presentational Dawid's answer in your link works perfect. However, if you want to display other fields for example you might be able to work with the Rules engine: Each individual field, section, Scriban etc. under the Variant Definition item has that field and can be utilized to make sure that does/doesn't render out depending on whether the ...


1

I have fixed this myself by overriding the following: Sitecore.XA.Foundation.RenderingVariants.Pipelines.RenderVariantField.RenderSection Sitecore.XA.Foundation.RenderingVariants.Pipelines.RenderVariantField.RenderTitle With this code: protected override void GetAttributeTokenValues( Item item, IDictionary<string, string> attributes, ...


1

The image component has an Experience Editor Button. If you check the item /sitecore/layout/Renderings/Feature/Experience Accelerator/Media/Image you will see that the field "Experience Editor Buttons" there has a selection "Edit Image". This is the button that is added in the XP editor. You can achieve similar functionality with Edit ...


1

One solution would be to create a custom renderField pipeline processor like this: public void Process(RenderFieldArgs args) { Assert.ArgumentNotNull(args, "args"); if (Sitecore.Context.Site.DisplayMode == Sitecore.Sites.DisplayMode.Edit) return; var field = Sitecore.Data.Fields.FieldTypeManager.GetField(args....


1

Yes, you can. The steps to take: Determine the GUID of the style you want to select: search the style item in $site/Presentation/Styles Make sure the rendering parameters template of your component has standard values In those standard values, set the view to "raw values" (you can do so in the View ribbon) In the Styles field (in the Styling ...


Only top voted, non community-wiki answers of a minimum length are eligible