[CPS-users] Compound widgets don't render class attribute ofsubwidgets.

JoseLuis de la Rosa Triviño joseluis.rosa at iavantefundacion.com
Mon Apr 17 20:00:49 CEST 2006


Hello,

 

I manage to include the class attribute by modifying the page template widget_compound_default_render.pt. I replaced this tal:block:

 

{{{

<tal:block condition="python: mode == 'view'">

      <tal:block repeat="cell cells">

        <tal:block define="widget cell/widget">

          <div tal:attributes="class cell/css_class|nothing;

                               id python:widget.getHtmlWidgetId()+'_widget';

                              ">

            <div class="label" tal:condition="widget/label">

              <tal:block i18n:translate="" tal:condition="widget/is_i18n"

                    tal:content="widget/label">label</tal:block>

              <tal:block tal:condition="not:widget/is_i18n"

                    tal:content="widget/label">label</tal:block>

            </div>

            <tal:block replace="structure cell/widget_rendered" />

          </div>

        </tal:block>

      </tal:block>

  </tal:block>

}}}

 

with this one:

 

{{{

  <tal:block condition="python: mode == 'view'">

      <tal:block repeat="cell cells">

        <tal:block define="widget cell/widget">

          <div tal:attributes="class cell/widget_css_class|nothing;

                               id python:widget.getHtmlWidgetId()+'_widget';

                              ">

            <div class="label" tal:condition="widget/label">

              <tal:block i18n:translate="" tal:condition="widget/is_i18n"

                    tal:content="widget/label">label</tal:block>

              <tal:block tal:condition="not:widget/is_i18n"

                    tal:content="widget/label">label</tal:block>

            </div>

            <span class="content">

            <tal:block replace="structure cell/widget_rendered" />

            </span>

          </div>

        </tal:block>

      </tal:block>

  </tal:block>

}}}

 

What should cell/css_class return? 

 

Thanks.

JoseLuis de la Rosa Triviño 
Becario Área de Sistemas de Información 
FUNDACIÓN IAVANTE 
joseluis.rosa at iavantefundacion.com 
Tel. 951 015 300 

 

Este correo electrónico y, en su caso, cualquier fichero anexo, contiene información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda copia o divulgación deberá ser autorizada por IAVANTE.

This e-mail and any attachments are confidential and exclusively directed to its adressee(s). Any copy or distribution will have to be authorized by IAVANTE.

 

-----Mensaje original-----
De: JoseLuis de la Rosa Triviño 
Enviado el: lunes, 17 de abril de 2006 16:43
Para: cps-users at lists.nuxeo.com
Asunto: [CPS-users] Compound widgets don't render class attribute ofsubwidgets.

 

Hello everybody,

 

I have a layout with a compound widget that includes several widgets of the same layout. For all widgets in the layout I have set a value for the CSS class for view and CSS class (TALES). "class" attribute is rendered fine when the widget is rendered directly in the layout but if the widget is inside a compound widget no "class" attribute is generated by the html renderer.

 

Can anyone give some idea of how to do it so that this attribute is rendered?

 

Thank you very much.

JoseLuis de la Rosa Triviño 
Becario Área de Sistemas de Información 
FUNDACIÓN IAVANTE 
joseluis.rosa at iavantefundacion.com 
Tel. 951 015 300 

 

Este correo electrónico y, en su caso, cualquier fichero anexo, contiene información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda copia o divulgación deberá ser autorizada por IAVANTE.

This e-mail and any attachments are confidential and exclusively directed to its adressee(s). Any copy or distribution will have to be authorized by IAVANTE.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nuxeo.com/pipermail/cps-users/attachments/20060417/0a206b0d/attachment.html


More information about the cps-users mailing list
More information about CPS: CPS project - CVS - API

Hosting: Nuxeo: Zope service provider


This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.