Personal tools
You are here: Home Forums Plone Blog Illegal XHTML generated by qPloneBlog portlet
Document Actions

Illegal XHTML generated by qPloneBlog portlet

Up to Plone Blog

Illegal XHTML generated by qPloneBlog portlet

Posted by Martin Kneißl at August 14. 2007

The macro definition is done with a div tag. Due to the missing tal:omit-tag, the <div> is rendered in a definition list where no div is allowed. See marked change below. Now the XHTML Validator does not complain any more.


 


<!-- macro used by the portlets to compile a list of recent additions -->
<div metal:define-macro="portletRecent" tal:omit-tag="">
     <tal:x tal:condition="maxItems|nothing"><tal:x tal:define="global maxResults maxItems"/>
     </tal:x><tal:x tal:condition="not: maxItems|nothing"><tal:x tal:define="global maxResults python:0"/>
     </tal:x><tal:block tal:define="maxResults python:test(maxResults==0,here.simpleblog_tool.getMaxItemsInPortlet(),maxResults);
                                    recent python:startpoint.getEntries(maxResults=maxResults,skipOnTop=1, join=1);
                                    global showIcons startpoint/getShowIcons;"
     tal:omit-tag=""><tal:toggle tal:define="global toggle python:1"/>
    <tal:entries tal:repeat="entry recent">
        <tal:start tal:condition="python:inBlog and not solo">
        <dd class="" tal:define="oddrow repeat/entry/odd"
                     tal:condition="repeat/entry/start"
                     tal:attributes="class python:test(toggle, 'portletItem odd','portletItem even')">
            <tal:frontpage>
                <strong i18n:translate="recent_additions">Recent entries:</strong>
            </tal:frontpage>
        </dd></tal:start>
        <dd class=""
            tal:define="oddrow repeat/entry/odd;
                        item_type entry/portal_type;
                        item_type_class python:'contenttype-' + normalizeString(item_type);"
            tal:attributes="class python:test(toggle, 'portletItem even','portletItem odd')">
            <a href="#"
               tal:attributes="href entry/absolute_url;"
                               title="entry">
               <span tal:attributes="class python:showIcons and 'simpleBlogPortletIcons '+item_type_class or ''" tal:content="entry/title_or_id"/>
            </a><tal:toggle tal:define="global toggle python:test(toggle==1,0,1)"/>
        </dd>
        <dd class=""
            tal:define="oddrow repeat/entry/odd;
                        solo solo|python:0;
                        className python:test(solo,'portletFooter', 'portletItem')"
            tal:condition="repeat/entry/end"
            tal:attributes="class python:test(toggle, className + ' even', className + ' odd')">
            <a href="#" tal:attributes="href string:${startpoint/absolute_url}/SimpleBlogFullSearch"
                           title="more..."
                           i18n:attributes="title box_morelink"
                           i18n:translate="box_morelink"
                           i18n:domain="plone">More...</a>
        </dd></tal:entries>
    <tal:no-items tal:condition="not: recent">
        <dd class="portletItem even">
            <strong i18n:translate="recent_additions">Recent additions:</strong>
        </dd>
        <dd class="portletItem odd">
            <span i18n:translate="no_published_blog_entries">No blog entries are published.</span>
            <tal:toggle tal:define="global toggle python:0"/>
        </dd></tal:no-items></tal:block>
</div>


Re: Illegal XHTML generated by qPloneBlog portlet

Posted by Martin Kneißl at August 14. 2007

Hmm. No plain HTML possible here? OK. The strange smilies above mean < t a l : o m i t - t a g = " " > . Just in case it was not obvious. And now a real smilie 8)


Powered by Ploneboard