Skip to content

Purpose of z.Glass.Mapper.Sc.ViewRender.config? #449

@kningyi

Description

@kningyi

Hi there,

I'm upgrading the GlassMapper references for a project I took over, and I notice that there's a config file z.Glass.Mapper.Sc.ViewRender.config.exclude present after installing the latest nuget package (sc 10.0.2, Glass.Mapper.Sc.100, v5.8.180).

Can I check what's the purpose of this file, and why is it optional? (I would have thought it would be mandatory after reading its related issues?)

I also see a comment in the config file <!--After including this file in your project update the code in the GlassMapperScCustom --> - do I still need to update any code if I'm not using a customised GlassMapperScCustom.cs?

Here's my custom config patched after the original Glass.Mapper.Sc.Start.config file:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="MyCompany.Foundation.Orm.App_Start.GlassMapperSc, MyCompany.Foundation.Orm">
          <patch:delete />
        </processor>
        <processor type="Glass.Mapper.Sc.Pipelines.Initialize.GlassMapperSc, Glass.Mapper.Sc" />
      </initialize>
      <glassMapper.addMaps help="Processors should derive from Glass.Mapper.Sc.Pipelines.AddMaps.AddMapsProcessor">
        <processor type="MyCompany.Foundation.Orm.Processors.CustomAddMapsProcessor, MyCompany.Foundation.Orm" />
      </glassMapper.addMaps>
    </pipelines>
  </sitecore>
</configuration>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions