6

Based on this post - Why do Experience Manager TBBs insist on outputting a new tag around every Component Presentation and Component Field?, I am assuming the OOTB DWT functions in 2013 SP1 such as @@FieldStartMarker("fieldname")@@ gives per-field control for XPM inline editing, and these are basically the "Mark" functionality available here - https://github.com/TridionPractice/tridion-practice/wiki/TridionUI2012FunctionsForUseInHtmlTemplates.

When I use the @@FieldStartMarker("fieldname")@@, the comments needed for inline editing that are rendered using the "Mark" functionality are not rendered. Just the content gets rendered. For example, using the "Mark" functionality I'm able to target a single field and render the comments necessary for inline editing.

<div class="content">
  <!-- TemplateBeginIf cond="Fields.Title" -->
    @@MarkComponentField('Fields.Title')@@
   <h3>@@RenderComponentField("Fields.Title", 0)@@</h3>
  <!-- TemplateEndIf -->
</div>

The code above renders

<div class="content">
  <!-- Start Component Field: {'XPath' : 'tcm:Content/custom:Content/custom:Fields.Title[1]'} -->
    <h3>
        Blah blah blah
    </h3>
</div>

I was thinking the OOTB DWT function @@FieldStartMarker("fieldname")@@ would be able to render the comments for XPM inline editing and target a specific field like the "Mark" functionality.

<div class="content">
  <!-- TemplateBeginIf cond="Fields.Title" -->
     @@FieldStartMarker("Fields.Title")@@
       @@FieldValueStartMarker()@@
        @@GetFieldValue("Fields.Title", 0)@@
      @@FieldValueEndMarker()@@
    @@FieldEndMarker()@@
  <!-- TemplateEndIf -->
</div>

However, the code above just renders the content and not the comments.

So, I'm wondering if there are any OOTB DWT functions in 2013 SP1 that:

  1. can control the placement of the Component Presentation XPM comments and
  2. can disable the wrapping <span> elements.
4

No, I'm sorry Sabarish, it looks like we made assumptions (mostly by me) in that post. I added a comment clarifying that the new "start field" syntax was only added to control multi-value fields.

You can see in examples that the <span> is still added in Experience Manager.

Definitely submit or upvote the idea on SDL Tridion Ideas. There's apparently an open enhancement request for control over these tags, but community support can help prioritize the request.

  • The span tags are added by the TBB, you can modify them to something else, but AFAIK you can't remove them. – Nuno Linhares Aug 28 '15 at 11:43
2

Even though it's not OOB I'd still like to point to Tridion UI 2012 functions for use in HTML templates as these will essentially give you what you need without having to reinvent the wheel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.