Our Blog > Blog Detail

Web Content Viewer- Asponte Custom Skin

Actions

WCM 8.5 CF09 - InContext Tag Changes

  • Created By: Kapish Aggarwal
  • Updated: March 18, 2016

Previous blog entries have discussed the power of using the InContext tag. Cumulative Fix Pack 09 for WCM 8.5 has modified the behavior of the InContext tag, which will cause some previous code to no longer work. 

UUID Parameter and No Content Found Behavior

The first noticeable change is how the InContext tag behaves when it is directed to a site area without a content or no valid content. Previously, the following code would result in an empty string being generated if the defined path did not exist (or was to a site area without content underneath it).

[InContext path="../ChildContent" uuid="[Property field='id' context='autofill' type='content']"]

Shifted Context

[/InContext]

 

If "ChildContent" does not exist, the InContext tag would previously generate "". After CF09, the InContext tag will generate "null". The previous behavior used to let us effectively run a conditional check based on the presence of content. If there was content, generate the string (or HTML). Otherwise, generate nothing. Now, the "else" portion generates null.

To get around this change in behavior, one must take advantage of the force path behavior. If the InContext tag contained only a path parameter, it would run the code as long as the path existed (even if it was a siteare with no content). The below code would function similarly to the previously expected behavior:

[InContext path="[Property field='name' format='path' context='autofill' type='content']/../ChildContent"]

[Component ... ]

[/InContext]

Where the Component tag calls a Menu or Navigator that allows for a No Result Design. The No Result Design becomes our use case for no content underneath the site area in question and the result design would contain the previous text (in this example, "Shifted Context").

 

Contact Form- Asponte Custom Skin

Actions

Contact Us

*
*


Submit
Call Us 888-926-9434
Complementary Content
${loading}