Feature Pack 5

Update and defining Marketing tool top objects to display folders

Feature Pack 5

In this lesson, you are updating and defining the top object definitions of the marketing tool. By updating and defining these objects, you ensure that your folders display in the explorer view and utilities view for Management Center.

Feature Pack 6 or laterAttention: This tutorial is based on the folder support that is included in Feature Pack 5 and is not recommended if you are on a newer feature pack level. Beginning with Feature Pack 6, support is provided by default for grouping e-Marketing Spots, activities, customer segments, marketing content, promotions, and attribute dictionary attributes. This support includes the capability of creating, changing, and deleting folders within the Management Center Catalogs, Marketing, and Promotions tools. You are not able to group folders created by following this tutorial with folders that are created by using Management Center. If you create Management Center folders by following the steps included in this tutorial, delete those folders before you create folders by using Management Center. For more information about folders, see Folders.

Feature Pack 7 or laterSupport is provided by default for grouping content pages and layouts in the Commerce Composer tool. This support includes creating, changing, and deleting folders with the Commerce Composer tool.

About this task

A top object definition is an organizational object definition that describes the root object for an instance of wcfBusinessObjectEditor. This root object is the starting point for populating the explorer and utilities views with your folders. To ensure that your folders display in the explorer view and utilities view, you must update the MarketingTopObjectDefinition object definition. To update the top object definitions, you must include the definitions for the following e-Marketing Spot folder objects:
  • AllEMarketingSpotFoldersTop
  • EMarketingSpotFolder
  • EMarketingSpotFolderReference
  • InheritedEMarketingSpotFolder
  • InheritedEMarketingSpotFolderReference

For more information about setting a top object in the explorer view, see defining a top object definition in the explorer view.

Procedure

  1. Navigate to LOBTools > WebContent > config > commerce > marketing > objectDefinitions
  2. Open the MarketingTopObjectDefinition.def file for editing.
  3. Locate the list of OrganizationalObjectDefinitions and add the following code after the existing OrganizationalObjectDefinitions:
    <OrganizationalObjectDefinition definitionName="AllEMarketingSpotFoldersTop" detailsViewHeaderText="${extMarketingResources.allEMarketingSpotFolders_headerText}" displayName="${extMarketingResources.allEMarketingSpotFolders_displayText}" objectType="AllEMarketingSpotFoldersTop">
                <GetChildrenService url="/cmc/GetTopFolders">
                      <ServiceParam name="storeId"/>
                      <ServiceParam name="folderType" value="EMarketingSpotFolder"/>
                      <ServiceParam name="folderObjectType" value="EMarketingSpotFolder"/>
                </GetChildrenService>
                <NavigationListDefinition baseDefinitionName="extTopEMarketingSpotFolderGridChildList"/>
          </OrganizationalObjectDefinition>
    The preceding code defines an OrganizationalObjectDefinition for displaying a node that contains all top-level folders. This object must have a display name to ensure that users can expand the node to view your folders in Management Center.
  4. Locate the TopObjectDefinition named mktMarketingTopObjectDefinition and add the following code in the XML template section:
    <object objectType="AllEMarketingSpotFoldersTop"/>
    This code ensures that the marketing tool instantiates the instance of your new object type that is necessary to display your folders.
  5. You must extend the Marketing filter definition to include folder-related object types in a custom filter. The filter is used to filter the objects that display in the explorer view and utilities view browse tab. To extend the Marketing filter definition:
    1. Navigate to LOBTools > WebContent > config > commerce > marketing
    2. Right-click marketing; click New > File
    3. For the File name, enter MyMarketingFilters.def. Click Finish.
    4. Open the MyMarketingFilters.def for editing. Add the following code into the file:
      <Definitions> 
            <ObjectTypeFilter definitionName="extMarketingExplorerWithoutSearchFilter" displayName="${mktMarketingResources.marketingObjects}" filterType="MarketingFilter" objectTypes="ActivitiesTop,ActivityTemplatesTop,MarketingContentTop,CustomerSegmentTop,EMarketingSpotTop,EmailTemplatesTop,CampaignsTop,AllEMarketingSpotFoldersTop,EMarketingSpotFolder,InheritedEMarketingSpotFolder,EMarketingSpotFolderReference,InheritedEMarketingSpotFolderReference">
                  <EnablementCondition contextName="searchEnabled" enablementValue="true" negate="true" conditionId="searchDisabledContextValueCondition"/>
            </ObjectTypeFilter>
       
            <ObjectTypeFilter definitionName="extMarketingExplorerWithSearchFilter" displayName="${mktMarketingResources.marketingObjects}" filterType="MarketingFilter" objectTypes="ActivitiesTop,ActivityTemplatesTop,MarketingContentTop,CustomerSegmentTop,EMarketingSpotTop,EmailTemplatesTop,CampaignsTop,SearchActivitiesTop,SearchActivityTemplatesTop,AllEMarketingSpotFoldersTop,EMarketingSpotFolder,InheritedEMarketingSpotFolder,EMarketingSpotFolderReference,InheritedEMarketingSpotFolderReference">
                  <EnablementCondition contextName="searchEnabled" enablementValue="true" conditionId="searchEnabledContextValueCondition"/>   
            </ObjectTypeFilter>
      </Definitions>

      The preceding code defines the object types that are allowed to be displayed in the left navigation tree of the marketing tool. The object types display in the explorer view of the Marketing tool. You must add the new object types for the folder. You can alter the preceding code to allow for other object types.

    5. Save your changes.
  6. Update the main definition for the Marketing tool to include the folder-related information:
    1. Navigate to LOBTools > WebContent > config > commerce > marketing
    2. Open the MarketingManagementToolDefinition.def file for editing.
    3. Locate the BusinessObjectEditor definition at the top of the file and the browseUtilityFilterTypes attribute. Add the following code after the attribute declaration to define the objects that display in the utilities view browse tab:
      ,AllEMarketingSpotFoldersTop,EMarketingSpotFolder,InheritedEMarketingSpotFolder,EMarketingSpotFolderReference,InheritedEMarketingSpotFolderReference

      The updated code resembles the following code:

      <BusinessObjectEditor browseUtilityFilterTypes="MarketingFilter,MasterCatalog,MasterCategories,SalesCategories,ManagedContentsFilter,AttachmentResourceFilter,MarketingLocationFilter,AllEMarketingSpotFoldersTop,EMarketingSpotFolder,InheritedEMarketingSpotFolder,EMarketingSpotFolderReference,InheritedEMarketingSpotFolderReference" definitionName="mktMarketingManagement" displayName="${shellResourceBundle.marketingManagementDisplayName}" explorerFilterTypes="MarketingFilter" gettingStartedPageClass="wcfMarketingGettingStartedPage" helpLink="concepts/csbmarketingtools.htm">
    4. Locate the Filters section, which resembles the following code:
      <ObjectTypeFilter baseDefinitionName="mktMarketingExplorerWithoutSearchFilter"/>
      <ObjectTypeFilter baseDefinitionName="mktMarketingExplorerWithSearchFilter"/>
      Override the first two ObjectTypeFilter types for marketing by changing the types to the following code:
      <ObjectTypeFilter baseDefinitionName="extMarketingExplorerWithoutSearchFilter"/>
      <ObjectTypeFilter baseDefinitionName="extMarketingExplorerWithSearchFilter"/>
    5. Locate the list of OrganizationalObjectDefinitions that can display in the marketing tool and append the following code:
      <OrganizationalObjectDefinition baseDefinitionName="AllEMarketingSpotFoldersTop"/>
      The preceding code ensures the AllEMarketingSpotFoldersTop object displays in the explorer view. This object is the highest level node in the folder tree that displays all the top-level folders
    6. Locate the Marketing Primary Objects section, and add the primary objects that are defined for folders:
      <!-- Primary Objects for folders -->              
      <PrimaryObjectDefinition baseDefinitionName="EMarketingSpotFolder"/>              
      <PrimaryObjectDefinition baseDefinitionName="InheritedEMarketingSpotFolder"/>
    7. Save your changes. With the addition of the preceding code, your marketing tool is set up to display your folders.
  7. Right-click LOBTools Project; click Build OpenLaszlo Project to produce an updated ManagementCenter.swf file under the workspace_dir\LOBTools\WebContent directory.