New answers tagged

0

Perhaps you can explore the use of the code: datasource parameter where you write you own class library to resolve the item. That may allow you to do the comparison of version numbers. Pipeline to consider: <getRenderingDatasource> </getRenderingDatasource>


0

From the error it can be seen that there is problem with SOLR index. Can you try rebuilding the Sitecore_Web_Index and in case you are using any custom index for CD and have exclude the tree from Web index then you will need to include it. Hope it helps.


0

Atul Kumar's answer should work for you. An alternate way is to get item by ID Item item = Sitecore.Context.Database.GetItem(Sitecore.Data.ID.Parse(itemId)); and then pass the item to below func - private bool HasPresentationDetails(Item item) { return item.Fields[Sitecore.FieldIDs.LayoutField] != null && !String.IsNullOrEmpty(item.Fields[...


0

I guess you are trying to identify if the datasource item is a page or just a content item. Ideally in Sitecore an item can be called a page if there is any presentation details associated with that item and this can be checked by using below code. item.Visualization.GetLayout(Sitecore.Context.Device); Above line of code will tell you if any presentation ...


0

You can use Sitecore.Context.Item.ID. This will return current page item ID. Use RenderingContext.Current.Rendering.Item.ID will return you the data source item ID. You can compare the ID with one of this and execute your code accordingly. Regards, Girish


0

I ended up opening a support ticket with Sitecore and they identified this as a known bug. The hotfix I received today is SC Hotfix 418336-1 SXA 9.3.0.2589. Consider contacting them for the latest hotfix, as it may include other fixes to SXA.


0

I fixed it. Just moved the firsthome and secondhome under "home" item and changed the home item template to a redirect template. All I need to do is now change the 302 redirect into an 301 somehow


0

In terms of SXA then: How to remove a version of the data source on a single click of removing version of the page (associated version of the data source items). There is no such automation on the SXA side, you will need to implement it on your own. Is there any setting in Sitecore for adding/removing version for data source when we add a version of the page....


1

There are a few things you need to fix in your code: You are not using constructor injection in a proper way as you are manually creating your repository in GetModel() method. It should look like this: public class NotificationController : VariantsController { private NotificationRepo _repository { get; set; } public NotificationController(...


0

@Gatogordo is correct that the field name is different than the one you were testing. Here is an example of __Updated working: Scriban variant Field variant Page output


0

The name of the updated fields is actually __Updated and not just Updated. Did you try that as field name in the variant?


0

I don't see any additional pieces of information from your side (as it was suggested in the comments) so I will write what I think you might be missing. You wrote that you have a custom AccordionMvcLayout.cshtml. If you will take a look inside of that file, you will notice that on the top there is something like: @{ Layout = Sitecore.Configuration....


0

The JSON Variants just like normal Rendering Variants are using RenderVariantField pipeline to define processors. Each processor is responsible for rendering the different type of a variant item. The reference is rendered using RenderJsonReference.cs. I would need to double-check, but it seems to me that a potential null check is missing in the code. But ...


0

Updated with 9.3 Resolve and Query Tokens Resolve Tokens $compatibleThemes - path to all themes. $theme - currently used theme. $pageDesigns - root of page designs (sitecore/content/Tenant/Site/Presentation/Page Designs). $partialDesigns - root of partial designs (/sitecore/content/Tenant/Site/Presentation/Partial Designs) . $currenttemplate - name of the ...


1

I had this an the issue was either installing the wrong version of Sitecore Powershell Extensions or the wrong version of SXA. Make sure you get Sitecore Powershell Extensions 5.0 for Sitecore 9.2. There is a link on the SXA download page.


3

In SXA, we have custom service called IndexResolver which we are using to resolve proper index (including site indexes if such are defined). It has the following priorities while resolving index: It will first, check if there are any language-specific indexes defined in the site, e.g.: master/en Then, it will check if there are any database indexes defined ...


0

You should be able to do it. As far as I can see, it is working fine on the latest code. Two custom fields in on the route template: And they are visible in Experience Editor: UPDATE: It is also working fine with fields inherited from a base template. Take a look here:


Top 50 recent answers are included