|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Jerc Smarty Rookie
Joined: 26 Jan 2010 Posts: 30 Location: Slovenia / Ljubljana
|
Posted: Wed May 23, 2012 7:28 am Post subject: html_select_date, extra parameters |
|
|
I would like to add jQuery data-inline="true" parameter. But extra parameter could not have '-' as "key". It works fine if parameter is datainline, data_inline,...
This is my code (it throws exception):
Code: | {html_select_date prefix='ccExp' display_days=false display_years=false month_value_format='%m' data-inline='true'} |
Tested on Smarty: 3.0.8 and 3.1.8. |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Wed May 23, 2012 7:59 am Post subject: |
|
|
This is a parser issue. I believe Uwe and I have discussed this a couple of months ago. There was some sort of problem with »-« in a property name. Maybe Uwe can look into this again? _________________ Twitter |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed May 23, 2012 8:04 pm Post subject: |
|
|
'-' is not a valid character in variable, attribute and function names as in any programming language as it could be source of ambiguous syntax. |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Wed May 23, 2012 8:25 pm Post subject: |
|
|
Isn't »foo-bar=« pretty specific enough?
In Smarty-terms »bar=« is not regarded as an assignment (because »bar« is not a variable). I don't see where »[a-zA-Z0-9_-]+« would pose any problems as parameter name. _________________ Twitter |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu May 24, 2012 4:02 pm Post subject: |
|
|
Plugin parameter name may now contain also "-" and ":".
The fix is now in the SVN trunk and will later be included in 3.1.9 |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Thu May 24, 2012 4:09 pm Post subject: |
|
|
For clarification, »data-name=""« for HTML5 compatibility and »foo:bar="baz"« for XML compatibility (might be required for OpenGraph stuff) _________________ Twitter |
|
Back to top |
|
Jerc Smarty Rookie
Joined: 26 Jan 2010 Posts: 30 Location: Slovenia / Ljubljana
|
Posted: Fri May 25, 2012 6:06 am Post subject: |
|
|
Many thanks for very quick fix. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|