3

TL;DR: When is Sitecore template item configuration enough and when is additional configuration in the Web.config necessary? Is there a clear division and what's the thought behind it?


When creating a new component based on standard Page List component, I didn't get it to work with pagination.

I had my controller inherit Sitecore.XA.Foundation.RenderingVariants.Controllers.Base.PaginableController, my rendering variant inherits the IPagination and IPaginable templates, set the List Signature for both the components, but still pagination wouldn't work:

pagination error

Luckily I found a saving angel who pointed me to this bit of config that I had to add my component to in order to get it to work with pagination:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <experienceAccelerator>
      <!-- List of renderings that support pagination. -->
      <paginationEnabledRenderings>
        <rendering id="{2E991AA4-4B08-43D2-AD2B-17C11E69A499}" name="Page List"/>
      </paginationEnabledRenderings>
    </experienceAccelerator>
  </sitecore>
</configuration>

This wasn't the first time I encountered this kind of double configuration, either; dynamic placeholders likewise have to be configured both in Sitecore templates and config patch files.

This leads me to wonder; When is Sitecore template item configuration enough and when is additional configuration in the Web.config necessary? Is there a clear division and what's the thought behind it?

There is a pretty clear page on the Helix site about it, but that mainly covers Web.configs and only states the difference between setting and configuration. But a lot of configuration for SXA can be done perfectly well in Sitecore in stead of Web.config. It is still separated from settings by residing in, for instance, the sitecore/templates/Feature folder and can interact just nicely with SXA foundation functionality by inheriting templates. So why do we need extra Web.config configuration for some things and not for others?

1 Answer 1

1

Keeping things as simple as possible should be always our goal while developing products. Then, users, developers can start using it faster with less effort at the beginning.

SXA team will really appreciate opinions and suggestions like this. We want to make your life easier but we are not necessarily aware of all things that bother you.

Recently Adam Najmanowicz organized MVP feedback session https://twitter.com/adamnaj/status/900718164161507328

where MVPs could hear about what is coming soon and propose features or ask for improvements. I think that initiatives like that are perfect for expressing all problems that you have (as a result we already delivered some of them in 1.5 and will bring more in 1.6)

What I can promise right now is that I will register a task for that (config review).

btw. SXA was written before Helix was defined ;) That's why some parts are validated both methods even though they could be checked for item inheritance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.