Subtle WCM 7.0 Change 2 : Tags
JohnJames 270000424B Visits (1322)
Originally posted on the ADL4WCM Blog by Eric Morentin - Aug 4 2010
WCM tags have undergone some significant changes in the upcoming release, though it is important to say upfront that everything you did with tags before is unchanged (maybe this is the definition of a subtle change).
The biggest and most obvious change is the way we represent
the tags in the UI. We have switched from < > to [ ] to denote a
tag. This has a few benefits:
You can continue to enter the tags in the old format, but WCM will auto-magically convert them to square brackets on processing the field. If you are dead against the new format you can go into the WCM configuration and switch the default token back to the old one (I would love to hear from users that do this to understand their reasons).
terms of the tags themselves, the big change is the merging of all the
meta data tags into a single [Property] tag. This means that IDCmpnt,
ProfileCmpnt, SecurityCmpnt and WorkflowCmpnt tags are now all just the
same Property tag. Again you can still enter the old tags but they will
be auto-magically converted over to the [Property] tag on save. So now
the only thing you need to try and remember is the "field" you want to
render, which is hard enough.... but does nicely lead into the next
subtle enhancement, which is the tag helper.....
While we are looking at the tag helper you will also notice another new button when editing a presentation template which is "Insert Element Tags". This is a helper that will insert [Element] tags into the field for all elements defined in an authoring template that you select. For example using the out of the box "Article" template, the markup inserted will be:
[Property type="content" context="current" field="title"]
The "Article" template is quite simplistic, but the idea would be that you remove the elements you don't want to use, and arrange the rest inside of the markup you are creating for the page. Hopefully this makes creating the initial markup for a specific template a little faster and less error prone.
Lastly we added a change to the behavior of context="autofill". For as long as we have supported "autofill" the behavior has been that autofill tags *only* work when used within "Result" design elements (e.g. "Design for each menu search result"). If you used them in a presentation template or a HTML component that was used outside of a menu then the tag was completely ignored. Now in 7.0 autofill will never be ignored. When encountered outside of menu, navigator or result design we will treat "autofill" as "current". Why did we do this? Well the main reason is this was the original intention of the autofill, but thats not really a reason. The main rational behind this change is that its now possible to create HTML components that are a little more flexible. If you have a summary component then it can be used in a menu as well as the header of the target content item. This feels like a controversial change, but it seems natural that autofill would be smarter then it has been in previous releases.
The change in token and the tag helper can be seen in the current beta.
Next stop will be the out of the box content. Though if someone wants to know about any specific area feel free to leave a comment. I will come back to the tags at a later date because we do have other changes as well (to the "type" field values)... and at some point I will have to talk about why we removed "Sites" and how you likely won't notice that change.