Skip to content

Commit

Permalink
Feature:837 "Extend for templates" could have dedicated .css files by…
Browse files Browse the repository at this point in the history
… a simple technical {html_head} inclusion.

git-svn-id: http://piwigo.org/svn/trunk@2464 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
vdigital committed Jul 31, 2008
1 parent 45960b4 commit 5059edd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
12 changes: 0 additions & 12 deletions include/template.class.php
Expand Up @@ -170,18 +170,6 @@ function set_filenames($filename_array)
{ /* examples: Are best_rated, created-monthly-calendar, list, ... set? */
$this->files[$handle] = '../.' . $localtpl;
/* assign their tpl-extension */
/* For test purpose: Do advanced users need a php access? */
// $localphp = '../.' . substr($localtpl,0,-3).'php';
// if (file_exists($localphp)) @include_once($localphp);

/* Does it have a samename.css available */
$localcss = substr($localtpl,0,-3).'css';
if (file_exists($localcss))
{
$this->html_head_elements[] =
'<link rel="stylesheet" type="text/css" href="'
. substr($localcss, 2) . '">';
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions template-extension/distributed/samples/my-thumbnails2.tpl
@@ -1,6 +1,7 @@
{* $Id$ *}
<!-- This is a sample of template extensions -->
{if !empty($thumbnails)}
{html_head}<link rel="stylesheet" type="text/css" href="{$smarty.template|substr:6:-3}css">{/html_head}
<ul class="thumbnails">
{foreach from=$thumbnails item=thumbnail}
<li>
Expand Down

0 comments on commit 5059edd

Please sign in to comment.