New answers tagged

3

I was able to accomplish this in a few steps in SXA 9.3. This approach implements the ISearchService included with SXA. We're basically extracting code that is used by the SearchController. Step 1 : Implement the custom search function. Add this to your IGenerateScribanContextProcessor. private delegate IEnumerable<Item> SearchItemsDelegate(Item item, ...


3

This is not an SXA or Scriban problem, this is a CSS problem. You can use the :nth-child() psuedo-selector to apply a style. For example, if you want all even-numbered divs to have your .reversed css applied, then instead of having: .landing-feature-card.reverse { /* some styles here */ } you could use: .landing-feature-card:nth-child(even) { /* ...


2

Facets work on fields. So you should have a field in your items that determines if the item is a product or an article (or ...). This could be the template, but that is rarely named as you want it. I solved a similar issue with a computed field. I added a computed field into my (sxa) index that contains the text you want as facet based upon the logic you ...


2

Code provided by Mark Gibbons works in general, but it has major 2 issues: Datasource will not be moved through the workflow if you haven't set initial state. if (item.Access.CanWrite() && (!item.Locking.IsLocked() || item.Locking.HasLock()) && ShouldProcess(innerItem, item, rulesRawValue2)) { ...


2

This is how query strings works. Browser needs to know which part of url is protocol (knows it as url contains // and http or http or ftp before), which part is domain (knows it because of . like .com, .net, ...) and ? is used for query strings so everything which is after this character is considered as query string to pass some parameters towards server. ...


4

Media Request Protection only kicks in when it needs to. It is designed to prevent media specific parameters from being manipulated (e.g. specifying a MaxWidth for an image of 10248000, forcing Sitecore to fill its media cache with useless scaling of images). Therefore if no parameter is present on your media url, no hashing is required. Sitecore will server ...


1

To disable the above animation follow the below steps. Gallery rendering in SXA uses the Galleria JS library. Galleria component is initialized in the /sitecore/media library/Base Themes/Components Theme/Scripts/component-galleria script. You can edit this script to disable the full screen view on mobile devices: api.initInstance = function(component, prop) {...


0

Unfortunately there is no way you can undo that, and only you can do manually, but i have some suggestions you can try which i did You can search for that package so for instance, i cloned one rendering "Free Hand HTML" and also cloned one component called "Plain HTML" and created my own module called "Free Hand" Now if after ...


0

There are two options for you You can use https://doc.sitecore.com/users/sxa/101/sitecore-experience-accelerator/en/add-a-map.html existing "MAP" rendering and you can use different options given in the document to show PINs Integrate google API and create you own component and render the map Let me know if you want to discuss further Thanks, D


2

A few things to consider when approaching this: Where are the geo coordinates stored? Are the items in the content tree or somewhere else? Does the bulleted list on the left match the items on the map? Does the static map share the same API key used in the global map provider setting? TIHIDI: Items used to source the list and map inherit from the SXA POI ...


0

As you can read on https://doc.sitecore.com/users/sxa/18/sitecore-experience-accelerator/en/walkthrough--adding-search-functionality-to-your-page.html the options for the suggestion mode are: Show search results: shows the search results, rendered by rendering variants. User will be redirected to the clicked item. Show predictions: shows search phrase ...


0

SXA has a very standard functionality of creating multitenant sites, Your question involves two steps, one deals with sitecore sxa and one is standard IIS configuration for any standard web based app For creating multiple sites in SXA there are plenty of documentation available but you can start with https://doc.sitecore.com/developers/sxa/17/sitecore-...


1

Right click on Tenant and add Site. Select required features and themes. Open SXA Site Manager from Powershell toolbox and Set Host name in SXA Site manager. Refer this for adding new multiple sites with SXA manger. Open IIS and create site with same host enter Add host name in host file (C:\Windows\System32\drivers\etc\hosts)


5

Yes, there is an embedded object called o_pagemode. You can use this like o_pagemode.is_experience_editor in an if statement. You can find all the options for the o_pagemode here: https://doc.sitecore.com/developers/sxa/101/sitecore-experience-accelerator/en/the-embedded-items-and-objects-in-the-scriban-context.html. The following lists notable properties of ...


2

I have something that seems to solve this issue for me. Please comment if you have more info or insight about this. It appears that Sitecore placeholders when generated are wrapped in a "div" with class "row". For my installation using "bootstrap 4", this behaviour is defined in Sitecore at "/sitecore/system/Settings/...


1

Make sure you're following all the below steps to add a form to a page:: Open the Toolbox. In the Forms section, select and drag the Sitecore Form Wrapper rendering to the relevant placeholder. After that, drag an Mvc Form rendering to the Sitecore Forms Wrapper. After dragging the Mvc Form onto the page, In the Select the Associated Content dialog box, ...


0

This is the example I have been working on to display a list of "news" items, with the possibility of differentiating the displayed rendering-variant according to whether or not the news item was the first in the results. I have used a Sitecore custom "rule" for determining whether or not the item being displayed is the first item (as ...


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

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, ...


0

Here is an example how we accomplished this. Involves the use of more components. First you will need a VariantPlaceholder in the promo's rendering variant. Then add two page lists into the placeholder for the promo: The first one has a page size of 1 The second has a page size of 4 Each page list can have it's own rendering variants Considerations: ...


0

Using the CSS solution is an option but would add too many images to your result (even if they are hidden) so I wouldn't do that. The rules engine as mentioned in another answer is usually a way to handle differences but I don't know of a rule that would be able to identify the first element of a custom query. Another option is to use Scriban. Your version ...


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 ...


Top 50 recent answers are included