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 84 matches
Smarty Forum Index
Author Message
  Topic: Block append and prepend directives override eachother
scuzzy

Replies: 5
Views: 23277

PostForum: Bugs   Posted: Sat May 12, 2018 7:36 am   Subject: Block append and prepend directives override eachother
I agree with gtozzi, if you had

child.tpl
{extends file="parent.tpl"}
{block name="MyBlock" prepend}Start{/block}
{block name="MyBlock ...
  Topic: Block functions in nested included templates behavior
scuzzy

Replies: 2
Views: 4796

PostForum: General   Posted: Thu May 10, 2018 11:54 pm   Subject: Block functions in nested included templates behavior
Hello, sorry for all the questions but I'm migrating a old version of smarty to the current version and I'm having problems with a behavior Confused

I am trying to leverage {block name="header" ...
  Topic: Extending Smarty_Internal_Resource_File with my own behavior
scuzzy

Replies: 2
Views: 3744

PostForum: General   Posted: Thu May 10, 2018 1:12 am   Subject: Extending Smarty_Internal_Resource_File with my own behavior
I have noticed that in an older version of smarty "allow_relative_path" is referenced multiple times, but now it only appears once?

Using: 3.1.32, Compared it to 3.1.27 (3.1.28 removed tw ...
  Topic: Extending Smarty_Internal_Resource_File with my own behavior
scuzzy

Replies: 2
Views: 3744

PostForum: General   Posted: Thu May 10, 2018 1:06 am   Subject: Extending Smarty_Internal_Resource_File with my own behavior
I know extending an "internal" class like "Smarty_Internal_Resource_File" is not ideal when "Smarty_Resource_Custom" exists.

However, I want to use 99% of the aspects ...
  Topic: What is getTags() supposed to return?
scuzzy

Replies: 9
Views: 7782

PostForum: General   Posted: Wed May 09, 2018 10:54 am   Subject: What is getTags() supposed to return?
What stops the user from inserting...
Wouldnt the security settings inherent in smarty would be enough? eg https://www.smarty.net/docs/en/advanced.features.tpl#advanced.features.security
  Topic: What is getTags() supposed to return?
scuzzy

Replies: 9
Views: 7782

PostForum: General   Posted: Wed May 09, 2018 10:51 am   Subject: What is getTags() supposed to return?
I doubt the DB "cost" of fetching all fields, and having some of them not get used is worth trying to code an elaborate solution for.
  Topic: What is getTags() supposed to return?
scuzzy

Replies: 9
Views: 7782

PostForum: General   Posted: Wed May 09, 2018 10:27 am   Subject: What is getTags() supposed to return?
I've been stumbling around the parser/lexer/compilers to try to solve a problem myself, but...

"Return array of tag/attributes of all tags used by an template"

private_print_expression ...
  Topic: Smarty: Time-Modifications
scuzzy

Replies: 6
Views: 5994

PostForum: General   Posted: Mon May 07, 2018 10:18 pm   Subject: Smarty: Time-Modifications
What do you think about?

If you had to write that code 50 times in various templates, you'd quickly move it to a modifier function I think Shocked https://www.smarty.net/docs/en/plugins.modifiers.t ...
  Topic: Install smarty via php composer
scuzzy

Replies: 7
Views: 13744

PostForum: General   Posted: Mon May 07, 2018 10:07 pm   Subject: Install smarty via php composer
My composer file looks like this

{
"require": {
"smarty/smarty": "^3.1"
}
}

My PHP looks like this

require( ' ...
  Topic: Why "Smarty" team do not update website design?
scuzzy

Replies: 22
Views: 20614

PostForum: General   Posted: Mon May 07, 2018 10:02 pm   Subject: Why "Smarty" team do not update website design?
Send them to [url=https://github.com/smarty-php/smarty]git hub? Laughing I know what you mean, smarty's website has been consistent for over a decade, its always nice to refresh the branding of a produc ...
  Topic: Suggestions on how to wrap my smarty vars with a function
scuzzy

Replies: 3
Views: 4113

PostForum: General   Posted: Wed May 02, 2018 10:16 pm   Subject: Suggestions on how to wrap my smarty vars with a function
Thanks for the reply bsmither, Correct, I basically want to transform the php that smarty generates to always apply this logic because our application has thousands of instances of this usage, and I'm ...
  Topic: Suggestions on how to wrap my smarty vars with a function
scuzzy

Replies: 3
Views: 4113

PostForum: General   Posted: Wed May 02, 2018 8:42 pm   Subject: Suggestions on how to wrap my smarty vars with a function
Hello,

I've been using smarty for quote some time now, and I'm trying to improve a concept I have with objects assigned to smarty that permit chaining till the end of the chain at which point the _ ...
  Topic: $template_dir {extends} fallback on similarly named files.
scuzzy

Replies: 3
Views: 7606

PostForum: General   Posted: Mon Feb 09, 2015 12:24 am   Subject: $template_dir {extends} fallback on similarly named files.
Thanks U.Tews, I'll look into it

Here's what I came up with...

/**
* Smarty recursiveextends prefilter plugin
* Permits {extends file="template.tpl"} to load templates wi ...
  Topic: $template_dir {extends} fallback on similarly named files.
scuzzy

Replies: 3
Views: 7606

PostForum: General   Posted: Sun Feb 08, 2015 11:26 pm   Subject: $template_dir {extends} fallback on similarly named files.
Just realized I may be able to achieve this with a PreFilter
  Topic: $template_dir {extends} fallback on similarly named files.
scuzzy

Replies: 3
Views: 7606

PostForum: General   Posted: Sun Feb 08, 2015 9:56 pm   Subject: $template_dir {extends} fallback on similarly named files.
Hi, I'm wanting to find out if its possible to modify the smarty extends compiler to allow it to automatically fall back to the next template_dir path if the file it's trying to extend has already bee ...
 
Page 1 of 6 Goto page 1, 2, 3, 4, 5, 6  Next
All times are GMT
Jump to:  


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