tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/346-html5-custom-data-attributesCascade CMS: Discussion 2014-03-25T21:27:11Ztag:help-archives.hannonhill.com,2010-02-09:Comment/210605382012-11-19T19:01:06Z2012-11-19T19:01:06ZHTML5 Custom Data Attributes<div><p>Hi,</p>
<p>Based on the error message you are receiving, it sounds as if
this error is occurring when you attempt to submit the Format. Is
that correct? I tried submitting a Format containing the same
content you provided but did not run into any problems. If the
error is instead occurring while rendering a Page, can you please
attach some sample XML data for us to use in conjunction with this
Format to see if we can replicate the error?</p>
<p>Thanks!</p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/210605382012-11-20T13:47:18Z2012-11-20T13:47:18ZHTML5 Custom Data Attributes<div><p>The error is occurring when trying to render a page. I'm not
sure what you mean by some sample XML data. Here is the XML that
the page renders.</p></div>krepshawtag:help-archives.hannonhill.com,2010-02-09:Comment/210605382012-11-20T14:00:42Z2012-11-20T14:00:42ZHTML5 Custom Data Attributes<div><p>To clarify, I'm looking for the Index Block XML that this
particular Velocity Format is transforming. In other words, the
Block that is assigned to the same page region as this Format.</p>
<p>Thanks</p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/210605382012-11-20T14:04:13Z2012-11-20T14:04:13ZHTML5 Custom Data Attributes<div><p>Sorry about that ... try this file ...</p></div>krepshawtag:help-archives.hannonhill.com,2010-02-09:Comment/210605382012-11-20T15:01:11Z2012-11-20T15:01:11ZHTML5 Custom Data Attributes<div><p>No problem. OK, I see this line in your Format:</p>
<pre>
<code><data-iview:thumbnail xmlns:data-iview="url">thumbnail</data-iview:thumbnail></code>
</pre>
<p>I'm guessing this may be an attempt to declare the namespace. Is
that correct? I removed this line and surrounded your code
with:</p>
<pre>
<code><div xmlns:data-iview="url">
...
</div></code>
</pre>
<p>and that seems to work. Does this help with your scenario? I
wasn't sure if that extra <code><div></code> would cause
problems or not. At this point (as you probably realized), it's
just going to be a matter of declaring that namespace prior to
using it.</p>
<p>So, the bottom portion of the Format looks like:</p>
<pre>
<code><div xmlns:data-iview="url">
<div data-iview:thumbnail="${_SerializerTool.serialize($smallPhotoLink, true)}" data-iview:image="${_SerializerTool.serialize($largePhotoLink, true)}" OnClick="location='${_SerializerTool.serialize($storyLink, true)}'" style="cursor: pointer;">
<div class="iview-caption" data-x="0" data-y="422">
<a href="${_SerializerTool.serialize($storyLink, true)}">
<span class="bannerTitle">$_SerializerTool.serialize($headline, true)</span>
<span class="readMoreBanner">READ MORE</span>
</a>
</div>
</div>
</div></code>
</pre></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/210605382012-11-20T17:29:50Z2012-11-20T17:29:50ZHTML5 Custom Data Attributes<div><p>That worked like a charm… Thanks so much for getting back
to me!</p>
<p>Sent from my iPhone</p></div>krepshawtag:help-archives.hannonhill.com,2010-02-09:Comment/210605382012-11-20T18:08:05Z2012-11-20T18:08:05ZHTML5 Custom Data Attributes<div><p>You bet! Glad I was able to help out. Take care.</p></div>Tim