Changeset 2464


Ignore:
Timestamp:
Jul 31, 2008, 8:58:44 AM (16 years ago)
Author:
vdigital
Message:

Feature:837 "Extend for templates" could have dedicated .css files by a simple technical {html_head} inclusion.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/template.class.php

    r2462 r2464  
    171171              $this->files[$handle] = '../.' . $localtpl;
    172172              /* assign their tpl-extension */
    173               /* For test purpose: Do advanced users need a php access? */
    174               // $localphp = '../.' . substr($localtpl,0,-3).'php';
    175               // if (file_exists($localphp)) @include_once($localphp);
    176              
    177               /* Does it have a samename.css available */
    178               $localcss = substr($localtpl,0,-3).'css';
    179               if (file_exists($localcss))
    180               {
    181                 $this->html_head_elements[] =
    182                 '<link rel="stylesheet" type="text/css" href="'
    183                 . substr($localcss, 2) . '">';
    184               }
    185173          }
    186174        }
  • trunk/template-extension/distributed/samples/my-thumbnails2.tpl

    r2462 r2464  
    22<!-- This is a sample of template extensions -->
    33{if !empty($thumbnails)}
     4{html_head}<link rel="stylesheet" type="text/css" href="{$smarty.template|substr:6:-3}css">{/html_head}
    45<ul class="thumbnails">
    56{foreach from=$thumbnails item=thumbnail}
Note: See TracChangeset for help on using the changeset viewer.