3

我有一个自定义解析器,它适用于PublicationStructureGroupPageComponent类型的项目。代码按预期运行,但我不清楚何时调用代码。我的Tridion.ContentManager.config文件包含以下提取:

<resolving>
    <mappings>
        <clear/>
        <add itemType="Tridion.ContentManager.CommunicationManagement.Page">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.PageResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
                <add type="UrbanCherry.Net.SDLTridion.CustomResolvers.DynamicBinaryLinkResolver" assembly="UrbanCherry.Net.SDLTridion.CustomResolvers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7729a00ff9574fb"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.CommunicationManagement.PageTemplate">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.PageTemplateResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.ContentManagement.Component">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.ComponentResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
                <add type="UrbanCherry.Net.SDLTridion.CustomResolvers.DynamicBinaryLinkResolver" assembly="UrbanCherry.Net.SDLTridion.CustomResolvers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7729a00ff9574fb"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.CommunicationManagement.ComponentTemplate">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.ComponentTemplateResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.CommunicationManagement.Publication">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.PublicationResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
                <add type="UrbanCherry.Net.SDLTridion.CustomResolvers.DynamicBinaryLinkResolver" assembly="UrbanCherry.Net.SDLTridion.CustomResolvers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7729a00ff9574fb"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.CommunicationManagement.StructureGroup">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.StructureGroupResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
                <add type="UrbanCherry.Net.SDLTridion.CustomResolvers.DynamicBinaryLinkResolver" assembly="UrbanCherry.Net.SDLTridion.CustomResolvers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7729a00ff9574fb"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.ContentManagement.Category">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.CategoryResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
            </resolvers>
        </add> 
    </mappings>
</resolving>

当我发布PublicationStructureGroupPage我的自定义解析器被调用一次(这是我所期望的),但是当我发布一个组件 (其架构链接到一个生成动态组件演示的组件模板)时,自定义解析器被调用两次。

这是预期的行为吗?如果没有,任何人都可以建议为什么我的解析器被第二次调用?

4

2 回答 2

5

解析器为组件调用一次,并且为与组件的模式关联的每个组件模板调用一次。为该架构添加额外的 CT 将调用次数增加到三个。

目前尚不清楚这是错误还是设计使然,但解释了调用次数。有趣的是,自定义解析器仅在取消发布组件时调用一次

于 2012-03-27T16:12:47.507 回答
1

我观察到,为当前发布操作的“范围内”的每个发布目标调用了一个自定义解析器。

于 2013-03-05T12:50:05.533 回答