Hot answers tagged

10

If you want the exact same component - that is not possible. That is probably referring to partial designs - which offer that functionality but those include the full component with its datasource. If you want to reuse components (or sets of components) and still be able to change the datasource, snippets might be a solution. They can be easily created (...


9

These items can be queried using code like this: var siteInfo = ServiceLocator.ServiceProvider.GetService<ISiteInfoResolver>().GetSiteInfo(Context.Item); if (siteInfo != null) { var siteContext = new SiteContext(siteInfo); var dictionaryPath = siteContext.Properties["dictionaryPath"]; }


9

From numerous experiments, I have put together the following tips and tricks. Note that a good score under the desktop tab is considerably easier to achieve, the mobile score in our responsive sites is the real score we should benchmark against. Backend Vs Front End Page speed can be divided into two distinct parts. Backend server response and front ...


8

My investigation has shown that it can be easily done by configuration. Individual placeholders can be explicitly excluded from wrapping: <?xml version="1.0" encoding="utf-8" ?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <experienceAccelerator> <grid> <...


7

This can happen if you follow the install guide and install Sitecore Powershell Extensions after installing SXA. When installing SPE, it will prompt about a scripts item already existing. If you selected to overwrite, it will delete the SXA powershell scripts. Instead, select Skip. To fix this, simply install the SXA package again.


7

You need to create your custom rule for this. Create a class which inherits StringOperatorCondition: using Sitecore; using Sitecore.Rules; using Sitecore.Rules.Conditions; namespace ClientName.Foundation.SitecoreExtensions.Rules { public class IsExperienceEditorMode<T> : StringOperatorCondition<T> where T : RuleContext { ...


6

Scope The easiest/fastest way is via scope but I see you don't want it. Searchable - modification There is a computed field in SXA named searchable. Based on a base template it adds a field to the index of type bool. So later SXA can determine whether an item should be searchable or not. You could extend it and include an additional check (based on a ...


6

SXA renderings are just like any other Sitecore components. You can just use standard Sitecore personalization for them with conditions [Except] where the current user is annonymous Where the [specific] field [is equal] to 1


6

Background Placeholder is wrapped with additional things here: Sitecore.XA.Foundation.Grid.Pipelines.RenderPlaceholder.AddPlaceholderWrapper The goal of this class is to provide consistent placeholder behavior depending on a current grid. How to get rid of additional markup You can exclude your custom placeholders from processing by adding an additional ...


6

SXA extends the default Sitecore Azure Search provider with geospatial features (we simply implemented those features on the SXA side). When the SXA is installed you can e.g.: order by distance search within area Edm.GeographyPoint field type will be present in the index for SXA point of interest item


6

For a project I worked on we created a custom Maps Connector theme. We copied the script provided OOTB with SXA, renamed it, then made some changes to it. Here is an example of how we changed it so the country was included: autocomplete.getPlacePredictions({ input: queryParams.text, 'componentRestrictions': { 'country': 'us' }, '...


6

Yes! SXA 1.9 has a new feature called Design rules. You will find a new field on the Page Designs item: where you can design a rule which will pick up Page Design for you thanks to new "select specified page design" action. Here is an example rule: So right now we have two fields where you can select Page Design and the priority is a fallow: If Page ...


6

SXA comes with a special package for the CD. If I recall correctly you simply unzip the package and dump out onto the server in the Sitecore web root. These instructions are documented in the installation guide. The master database is not used in the content delivery environment and often times that database is nowhere near it. Furthermore, Sitecore ...


6

You can answer this question on your own by using DotPeek. The GetSiteLevelCaching processor in GetRenderingCaching pipeline is responsible for processing those items. The code looks like this: public void Process(GetRenderingCachingArgs args) { ... var renderingId = args.Rendering.RenderingItem?.ID.ToString() ?? args.Rendering.RenderingItemPath; ...


5

TL;DR Yes it is possible, use this: @(Item.ID) I assume that you are using SXA renderings or if it's custom rendering its model inherits from RenderingModelBase If you need an explanation, please read the rest of my answer. Dynamic attributes I will describe all the possibilities that I know and will paste a screenshot with example configuration and ...


5

The default configuration for SXA seems to use the switchableLinkProvider whether you specify this via the defaultProvider or not. The documentation here shows how to change the linkManager provider per site. In this case, simply changing it to "sitecore" should work as it will pick up the values you've patched on the sitecore provider originally.


5

For Bootstrap 3, I think these were hardcoded on the body view, but for Bootstrap 4, on this item - /sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 4/Bootstrap 4 Grid Definition you should see a section that defines the Placeholder Wrapper tag/class


5

I found out that this behavior is related to the introduction of SwitchOnRebuild for Azure Search in Sitecore 9.0.2 As from that version, Sitecore has this feature, and it is turned on by default. Which is nice of course. To verify, check the indexes on your Azure Search app and you will see index names with _secondary after rebuilds. To know which actual ...


5

No - this is not possible. An SXA Page requires the SXA layout and the predefined structure for an SXA site. Either the site must be all SXA or it is just not SXA. The only way to convert your existing web-forms site into SXA is a complete re-write. You can have SXA and non SXA sites in the same instance, that will work fine. But you can't mix the page ...


5

The video component is handled by mediaelement.js, you'll need to edit the JavaScript file for this service in order to fix this issue. If you go to /sitecore/media library/Base Themes/Core Libraries/scripts/mediaelement-and-player and scroll down to the "media" section, download the mediaelement-and-player.jsmediaelement-and-player.js file there. Copy ...


5

Yep! You can do it by adding Rule item under your Sriban template item and using sc_evaluate function inside of the template. Example: I have a page which has two fields: Title Brand And I want to render Brand field only when it is Monday. In order to do that I'm using Page Content rendering (can be any other) with following rendering variant: And the ...


4

1) The root cause of your problem may be that you are not using proper version of SXA with your version of Sitecore. For Sitecore 9 Update 2 (Sitecore 9.0.2) you should have SXA 1.7 Update 1 (SXA 1.7.1) installed. Take a look on official compatibility matrix here: https://kb.sitecore.net/articles/180187 2) For Habitat actually you don't need to install ...


4

Adam Najmanowicz provided this nice image to aid in explaining. Under your current tenant site, create a new Datasource Configuration. Select rendering for which this new configuration is used. Specify your new datasource item template; this should inherit from the existing SXA data source item template. Specify the folder containing the data sources. ...


4

The quick answer is: you cannot do it. Once you install a module you cannot re-add it. There are several ways to deal with this. None is perfect but you might find the best for you and try to mitigate the issue. Force module installation You will trick SXA to think that module was not installed and then install it once again. Go to your site Find the ...


4

Is this correct behavior of a bug? This as a bug. This code simply does what it says. It will not work with language fallback which is not expected. Is there any hidden mechanism to enable language fallback on list components? Nope, you have to overwrite it or ask support for a hotfix. I cannot find it registered in the section so I ...


4

Standard Values on rendering The only one out of the box solution is doing it via Standard Values on rendering parameters. Pro: no code easy Cons: default values defined globally per rendering parameters ExecutePageEditorAction Add additional processor to ExecutePageEditorAction pipeline. Take a look at Sitecore.XA.Feature.PageStructure.Pipelines....


4

I don't think you will be able to do that. Firstly, the views (.cshmlt) used by SXA won't be reachable by your pages if they are not part of an SXA website. You are going to have a lot of these: Secondly, you said your old pages are webform based. SXA is MVC only, so again you will need to rework this part of your instance if you want to use the ...


4

This is part of SXA functionality. Data item represents page relative data source folder By default you can store data source in: global folder /sitecore/content/T/S/Data/Texts/Text1 page relative, under page /sitecore/content/T/S/Home/tests/Data/Text2) if you will remove it you will hide/remove part of the functionality. If you really want to remove ...


4

Yes and no. It depends if you want to set it globally or per site/per component. This is where default parameters for Bootstrap 4 are stored. Remember that modifying default SXA items is not recommended as values will be overwritten during update. They are global which means the same for every site and every rendering. Grid value can be different for ...


4

I do recall a bug in 8.2 update4 where the language search in Azure did not work properly with dashes in the language. The results would be for any part of the "language-culture". E.g. searching for fr-BE would give results for fr-BE, nl-BE, fr-FR and so on. This seems like your case (en-HK, en-AU and zh-HK all share at least the language or the culture). ...


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