Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Search found 15 matches
Smarty Forum Index
Author Message
  Topic: Template name inside a plugin
Roc

Replies: 3
Views: 7256

PostForum: General   Posted: Fri Jun 01, 2007 11:22 pm   Subject: Template name inside a plugin
you can't. maybe pass it as an attribute like template=$smarty.template.

Yes, that's a possible solution, but I don't like it really. The function is called very often within the template and the a ...
  Topic: Template name inside a plugin
Roc

Replies: 3
Views: 7256

PostForum: General   Posted: Fri Jun 01, 2007 8:35 pm   Subject: Template name inside a plugin
I'm gonna push this up again cause I didn't got an answer. Is it possible to find out the template name inside a custom template function? I need to know from where the function has been called to giv ...
  Topic: Template name inside a plugin
Roc

Replies: 3
Views: 7256

PostForum: General   Posted: Sat Jan 06, 2007 9:19 pm   Subject: Template name inside a plugin
I need to know the name of the template within a plugin. Is there any way to find this out via the $smarty variable. Inside a template you can get it by the reserved variable {$smarty.template} but I ...
  Topic: Assign template variables in local scope
Roc

Replies: 4
Views: 8139

PostForum: General   Posted: Sun Sep 10, 2006 3:23 pm   Subject: Assign template variables in local scope
Thanks, messju, your suggestion works like expected.
  Topic: Assign template variables in local scope
Roc

Replies: 4
Views: 8139

PostForum: General   Posted: Fri Aug 25, 2006 1:56 pm   Subject: Assign template variables in local scope
When you assign variables in a template they have a local scope to the template itself and all included templates. What I'm looking for is a clean way to assign local variables from PHP. Is there anot ...
  Topic: html_image should generate alt attribute
Roc

Replies: 7
Views: 18207

PostForum: Bugs   Posted: Sun May 04, 2003 4:15 pm   Subject: html_image should generate alt attribute
Using the file name as alt value doesn't make sense in many cases since the file name is often auto generated (e.g. MD5 hash), especially in typical situations when you need html_image like showing da ...
  Topic: html_image should generate alt attribute
Roc

Replies: 7
Views: 18207

PostForum: Bugs   Posted: Sun May 04, 2003 11:17 am   Subject: html_image should generate alt attribute
I think, an empty attribute (alt="") will be better as default. Try to browse a web site with lynx, and you'll see the reason: if the attribute is missing, lynx will display the filename instead, whic ...
  Topic: $this in modifiers
Roc

Replies: 14
Views: 32100

PostForum: Feature Requests   Posted: Sat May 03, 2003 12:04 am   Subject: $this in modifiers
You're right, in fact what I use is similar to an include. The params are also mapped. The reason I do it this way is to make it more comprehensive to the web designers I work together with. They are ...
  Topic: $this in modifiers
Roc

Replies: 14
Views: 32100

PostForum: Feature Requests   Posted: Fri May 02, 2003 10:57 pm   Subject: $this in modifiers
I had a need for this a few days ago. What I wanted to implement was the following:


{$var|wrapper:"box.tpl"}


that should result in building a html wrapper around the value. As $this is not a ...
  Topic: html_image should generate alt attribute
Roc

Replies: 7
Views: 18207

PostForum: Bugs   Posted: Mon Apr 21, 2003 11:22 pm   Subject: html_image should generate alt attribute
As I understood the recent HTML recommendations from the W3 consortium, every <img> tag should always contain an "alt" attribute, even if it's empty. The W3 validator throws an error when the al ...
  Topic: Array for $template_dir
Roc

Replies: 20
Views: 52163

PostForum: Feature Requests   Posted: Mon Apr 21, 2003 9:35 pm   Subject: Array for $template_dir
I also like the idea of a $default_resource_type (see poll thread). This will also make the lookup of template files transparent. What I like to avoid is a need for "path:" e.g.


{include fil ...
  Topic: Array for $template_dir
Roc

Replies: 20
Views: 52163

PostForum: Feature Requests   Posted: Thu Apr 17, 2003 10:16 pm   Subject: Array for $template_dir
Multi-language support is an additional thing. I primary use GNU gettext for that via a custom function, e.g.


{locale id="nav_home"}


Maybe I should write another feature ...
  Topic: Array for $template_dir
Roc

Replies: 20
Views: 52163

PostForum: Feature Requests   Posted: Thu Apr 17, 2003 9:41 pm   Subject: Array for $template_dir
Someone else had the same idea. This is from the wiki (Smarty Feature Sugguestions):


* Allow array for template_dir. This is something I've done before, it gives a lot of flexabilty to creat ...
  Topic: Array for $template_dir
Roc

Replies: 20
Views: 52163

PostForum: Feature Requests   Posted: Thu Apr 17, 2003 8:53 pm   Subject: Array for $template_dir
Thanks for the links. I took a look into most of the discussions and my conclusion is, that $template_dir as array optionally will solve the basic problem. I like this concept also, since Smarty is us ...
  Topic: Array for $template_dir
Roc

Replies: 20
Views: 52163

PostForum: Feature Requests   Posted: Thu Apr 17, 2003 8:18 pm   Subject: Array for $template_dir
Yes, of course this can be done via a resource handler. But I think, implementing the array functionality for $template_dir would be simpler than the resource handler - maybe I'm not right. Also to me ...
 
Page 1 of 1
All times are GMT
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP