Develop > Presentation layer > Customize marketing > Work with Product Advisor > Create a metaphor XML input file > Prepare a Guided Sell metaphor
Insert a metaphorLink element
MetaphorLink elements can be inserted into salesAssistant and answer elements.
To insert a metaphorLink element:
Procedure
- Insert the <metaphorLink> begin and end tags into the appropriate element. If the intended parent element is a <salesAssistant> element, the <metaphorLink> element should immediately follow the <template> element. If the intended parent element is an <answer> element, the <metaphorLink> element should immediately follow the <constraint> element.
- Place the following elements between the <metaphorLink> begin and end tags:
<metaCategoryId></metaCategoryId> <metaphorName></metaphorName> <templateName></templateName> <templateUsage></templateUsage> <passConstraint></passConstraint>
- To set the default link as a link to a different Guided Sell metaphor, for a different category:
- Enter the target metaphor's category reference number between the metaCategoryId begin and end tags.
- Enter the name of the target metaphor's data bean name between the <metaphorName> begin and end tags. If this links to a Product Comparison metaphor, for instance, this text would look similar to the following: com.ibm.commerce.pa.metaphor.ProductComparerMetaphor
- Enter the name of the template that should be used to display the target metaphor between the <templateName> begin and end tags. This value must include the entire path to a JSP file, including the servlet name, that you have created for this purpose. This does not require the host name. For example, this value could be: /webapp/wcs/stores/servlet/sa51.jsp
- Assign the template usage setting by entering a number between the <templateUsage> begin and end tags. The following values are valid for this element:
- 0
- Use the default metaphorLink defined for the Guided Sell metaphor.
- 1
- Go to the previous metaphor page. This is effectively the page viewed immediately before the current one.
- 2
- Use the <templateName> from this metaphorLink. This overrides the metaphor's default link.
- 3
- Link to a URL. You must include the entire URL in the templateName element, including http:// if linking to a remote host name.
- Specify whether constraints should be passed to the target metaphor by entering a value between the <passConstraint> begin and end tags. The following values are valid for this element:
- 0
- Don't pass feature constraints to the next page
- 1
- Pass feature constraints to the next page.
- To set the default link as a link to a different metaphor:
- Enter the target metaphor's category reference number between the metaCategoryId begin and end tags.
- Enter the name of the target metaphor's data bean name between the <metaphorName> begin and end tags. If this links to a Product Comparison metaphor, for instance, this text would look similar to the following: com.ibm.commerce.pa.metaphor.ProductComparerMetaphor
- Enter the name of the template that should be used to display the target metaphor between the <templateName> begin and end tags. This value must include the entire path to a JSP file, including the servlet name, that you have created for this purpose. This does not require the host name. For example, this value could be: /webapp/wcs/stores/servlet/sa51.jsp
- Assign the template usage setting by entering a number between the <templateUsage> begin and end tags. The following values are valid for this element:
- 0
- Use the default metaphorLink defined for the Guided Sell metaphor.
- 1
- Go to the previous metaphor page. This is effectively the page viewed immediately before the current one.
- 2
- Use the <templateName> from this metaphorLink. This overrides the metaphor's default link.
- 3
- Link to a URL. You must include the entire URL in the templateName element, including http:// if linking to a remote host name.
- Specify whether constraints should be passed to the target metaphor by entering a value between the <passConstraint> begin and end tags. The following values are valid for this element:
- 0
- Don't pass feature constraints to the next page
- 1
- Pass feature constraints to the next page.
- To set the default link as a link to an HTML page:
- Enter the URL for the target HTML page between the <templateName> begin and end tags.
- Enter the number 3 between the <templateUsage> begin and end tags.
- Enter the number 0 between the <passConstraint> begin and end tags.
Related concepts
Related tasks
Prepare a Guided Sell metaphor
Edit the question and answer tree