Example #1
0
 def image(self, component, class_=None):
     u"""
     """
     if component.style:
         width = component.style.width_html # Take explicit HTML width/height if defined in component.
         height = component.style.height_html
     else:
         width = None
         height = None
     if height is None and width is None:
         width = '100%'
     elif height is not None:
         width = None
     alt = component.alt or TX.path2Name(component.url)
     self.img(src=component.url, width_html=width, height_html=height, alt=alt,
         class_=TX.flatten2Class(class_, component.getPrefixClass()))