Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Search found 177 matches
Smarty Forum Index
Author Message
  Topic: Show data of a table based upon an other table
bsmither

Replies: 2
Views: 76

PostForum: General   Posted: Sat Jul 28, 2018 6:58 am   Subject: Show data of a table based upon an other table
I am thinking not inherently.

But, one can create an Output Filter that can determine the value of the key dynamic variable, fetch more database recordsets, process the recordsets, and populate ot ...
  Topic: Adding spaces between elements of a
bsmither

Replies: 11
Views: 234

PostForum: General   Posted: Sat Jul 21, 2018 3:20 am   Subject: Adding spaces between elements of a
See:
https://www.smarty.net/docs/en/language.function.foreach.tpl#foreach.property.last

We assume that $item is from an array of $items.

Therefore, using the foreach property of @last can deter ...
  Topic: Something wrong with the installation
bsmither

Replies: 5
Views: 565

PostForum: Installation and Setup   Posted: Sun Jun 10, 2018 2:47 pm   Subject: Something wrong with the installation
Is the PHP constant SMARTY_DIR defined anywhere?
  Topic: Why some modifiers syntax is not working?
bsmither

Replies: 1
Views: 207

PostForum: Smarty 3   Posted: Fri Jun 08, 2018 6:06 pm   Subject: Why some modifiers syntax is not working?
What are you using to view the output?

If a text editor, there should be white sapce and line endings.

If a web browser, leading white space and most line endings are removed. Elsewhere, sequenc ...
  Topic: Anti Click Jacking
bsmither

Replies: 4
Views: 228

PostForum: General   Posted: Fri Jun 08, 2018 5:46 pm   Subject: Anti Click Jacking
In this statement:<style id="antiClickjack">body{display:none !important;}</style>you have unescaped braces.
  Topic: Prestashop 1.6 issue
bsmither

Replies: 1
Views: 154

PostForum: General   Posted: Thu May 31, 2018 7:45 am   Subject: Prestashop 1.6 issue
That should be because Smarty was given a custom function file that has gone missing.

One possible sequence of actions where this could happen is if the application installation has its own include ...
  Topic: displaying array values in a custom HTML table
bsmither

Replies: 6
Views: 290

PostForum: General   Posted: Wed May 23, 2018 7:44 pm   Subject: displaying array values in a custom HTML table
Typically, the code you would be wanting to find is:
$Smarty->assign("Rows",$the_array_of_row_data);where $Smarty is the instantiated class object.
  Topic: displaying array values in a custom HTML table
bsmither

Replies: 6
Views: 290

PostForum: General   Posted: Wed May 23, 2018 5:17 am   Subject: displaying array values in a custom HTML table
It seems the PHP code is not populating $Rows is the way you are wanting.

For example, in $Row, you are wanting the first array element to be:
$Row["Id"] = "10"

But the PHP ...
  Topic: Check if radio button is Checked
bsmither

Replies: 4
Views: 241

PostForum: General   Posted: Mon May 21, 2018 4:09 am   Subject: Check if radio button is Checked
I would say it is possible, but very convoluted, and incredibly inappropriate.

Once Smarty has rendered the template and has submitted the final content to stdout or to a variable, your PHP code th ...
  Topic: syntax error: unbalanced parenthesis in if statement
bsmither

Replies: 7
Views: 373

PostForum: General   Posted: Tue May 08, 2018 4:10 pm   Subject: syntax error: unbalanced parenthesis in if statement
At the end of the template, add {debug}.

When the page is delivered to the browser, the browser will want to popup a window. Let it do so.

Scan the left pane of the window for the $klausurchange ...
  Topic: syntax error: unbalanced parenthesis in if statement
bsmither

Replies: 7
Views: 373

PostForum: General   Posted: Mon May 07, 2018 5:46 pm   Subject: syntax error: unbalanced parenthesis in if statement
Try changing:
{if (isset($_POST['muendl']))}to{if $smarty.post.muendl}
  Topic: Smarty: Time-Modifications
bsmither

Replies: 6
Views: 470

PostForum: General   Posted: Sat May 05, 2018 6:48 am   Subject: Smarty: Time-Modifications
You can try:
{"`$getRow.date` -`$getRow.time`"|strtotime|date_format:"%c"}
You will need to make sure the 'time' string is understandable to PHP.

I think "1 ...
  Topic: Suggestions on how to wrap my smarty vars with a function
bsmither

Replies: 3
Views: 353

PostForum: General   Posted: Wed May 02, 2018 10:36 pm   Subject: Suggestions on how to wrap my smarty vars with a function
If you are interested in an example, see:
https://github.com/markhughes/HTMLMinify-Smarty

Even though this is an output filter (changes the final string), it isn't simple. It demonstrates how elab ...
  Topic: Suggestions on how to wrap my smarty vars with a function
bsmither

Replies: 3
Views: 353

PostForum: General   Posted: Wed May 02, 2018 9:58 pm   Subject: Suggestions on how to wrap my smarty vars with a function
This template code manipulation is something you want to appear in Smarty's rendered output?

If so, you may be interested in a filter. See the docs about: registerFilter()
  Topic: Smarty Pagination
bsmither

Replies: 1
Views: 271

PostForum: General   Posted: Tue May 01, 2018 2:38 am   Subject: Smarty Pagination
According to the docs, this will cause that limit to be used:
{paginate_middle page_limit="5"}
This is supposed to then show, for example:
prev
 
Page 1 of 12 Goto page 1, 2, 3 ... 10, 11, 12  Next
All times are GMT
Jump to:  


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