Ignore:
Timestamp:
May 8, 2008, 3:13:13 AM (16 years ago)
Author:
rvelices
Message:

2 template features:

  • added a {html_head} smarty block - allow any template file to add content just before </head> tag (handy for plugins and allows to move more presentation logic to tpls); the content is usually <style> or <link> which must appear inside html <head> tag
  • by config allow some language strings to be replaced during template compilation -> better performance. drawback: changes in the language file will not be propagated until template is recompiled.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/template/yoga/month_calendar.tpl

    r2265 r2334  
    3737 </tr>
    3838 </thead>
    39 
     39{html_head} {*add the style to html head for strict standard compliance*}
     40<style type="text/css">
     41TABLE.calMonth TBODY TD, TABLE.calMonth TBODY TD DIV.calImg {ldelim}
     42  width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;
     43}
     44</style>
     45{/html_head}
    4046 {foreach from=$chronology_calendar.month_view.weeks item=week}
    4147 <tr>
     
    4551                        <td class="calDayCellFull">
    4652                                <div class="calBackDate">{$day.DAY}</div><div class="calForeDate">{$day.DAY}</div>
    47                                 <div class="calImg" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;">
     53                                <div class="calImg">
    4854                                        <a href="{$day.U_IMG_LINK}">
    4955                                                <img style="{$day.IMAGE_STYLE}" src="{$day.IMAGE}" alt="{$day.IMAGE_ALT}" title="{$pwg->l10n_dec('%d element','%d elements', $day.NB_ELEMENTS)}" />
     
    5157                                </div>
    5258                {else}
    53                         <td class="calDayCellEmpty" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;">{$day.DAY}
     59                        <td class="calDayCellEmpty">{$day.DAY}
    5460                {/if}
    5561        {else}
    56                 <td class="calDayCellBlank" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;">
     62                <td class="calDayCellBlank">
    5763        {/if}
    5864        </td>
Note: See TracChangeset for help on using the changeset viewer.