Author |
Message |
Topic: use DEBUG within tempalte? |
gordonisnz
Replies: 2
Views: 14274
|
Forum: General Posted: Sun Apr 03, 2022 3:02 am Subject: use DEBUG within tempalte? |
Hi, I know when you use the debug command, It creates a POP-UP with all the smarty variables.
Is there a way to use the same function but WITHIN the template/html (no pop-up?)
IE, i found an e ... |
Topic: Trouble assigning SUB array |
gordonisnz
Replies: 2
Views: 18302
|
Forum: General Posted: Thu May 27, 2021 5:33 am Subject: Trouble assigning SUB array |
Has anyone got a solution ?
Ive fixed my original problem - but now gettinG UNDEFINED INDEX TYPEOPTION
{if !(isset($outerform.$k.TYPEOPTION))}{assign $outerfor ... |
Topic: Trouble assigning SUB array |
gordonisnz
Replies: 2
Views: 18302
|
Forum: General Posted: Tue May 25, 2021 11:41 am Subject: Trouble assigning SUB array |
Hello. Is there a good example of how to assign a SUB array within a smarty template ?
PHP code :-
$array["family"]["Jones"]["name"]="b ... |
Topic: Find array value without foreach? |
gordonisnz
Replies: 3
Views: 6121
|
Forum: General Posted: Sat May 08, 2021 8:07 am Subject: Find array value without foreach? |
Ive found another thread to put "0" - but nothing seems to be working,.
$array.0.DAY
$array[0]["DAY"]
$array[0].DAY |
Topic: Find array value without foreach? |
gordonisnz
Replies: 3
Views: 6121
|
Forum: General Posted: Sat May 08, 2021 7:27 am Subject: Find array value without foreach? |
Hi, Ive got a query regarding getting data from an array.
DATA1 >> day >> 5
DATA1 >> month >> 3
DATA1 >> year >> 2020
DATA2 >> day >> 5
DATA2 ... |
Topic: Problem with print_r |
gordonisnz
Replies: 2
Views: 6093
|
Forum: General Posted: Sat May 08, 2021 6:40 am Subject: Problem with print_r |
Hello, I have a small problem with print_r
$array.$key|@print_r
when i look at this - the output is flushed to the left instead of being indented.. i cannot easily see any sub-arrays within it - ... |
Topic: Find year +1 |
gordonisnz
Replies: 3
Views: 5578
|
Forum: General Posted: Thu Jan 28, 2021 6:04 am Subject: Find year +1 |
I've solved it in PHP - but would be good to know if possible in a template |
Topic: Find year +1 |
gordonisnz
Replies: 3
Views: 5578
|
Forum: General Posted: Thu Jan 28, 2021 5:37 am Subject: Find year +1 |
https://www.smarty.net/forums/viewtopic.php?p=90050&sid=ab8befb59387903e8ea230d93666c30b
In the above thread, I found this trick :- {'Y'|date}
I am wondering, is there a way I can ... |
Topic: Choose template for small/big screens |
gordonisnz
Replies: 2
Views: 4898
|
Forum: General Posted: Fri Jan 22, 2021 10:36 pm Subject: Choose template for small/big screens |
Hello.
Ive got 2 lots of HTML code, and i'm using CSS to display/hide the output depending on the size of the screen.
I am using the w3-css codes, w3-hide-medium and w3-hide-large etc...
--- ... |
Topic: Help with syntax. |
gordonisnz
Replies: 1
Views: 4372
|
Forum: General Posted: Sun Jan 17, 2021 5:36 am Subject: Help with syntax. |
Ive fixed it.
{foreach from=$va key=kaa item=vaa}
{assign var=TEMP value="$k-$ka-$kaa"}
<option value="{$k}-{$ka}-{$kaa ... |
Topic: Help with syntax. |
gordonisnz
Replies: 1
Views: 4372
|
Forum: General Posted: Sun Jan 17, 2021 5:24 am Subject: Help with syntax. |
Hello. Ive got a syntax error in an apparently simple piece of Smarty template.
basically ive got 3 layers of FOREACH code :-
{foreach from=$regions key=k item=v}
{$tmpa = ks ... |
Topic: Problem with Smarty and MYSQl - searching spaces |
gordonisnz
Replies: 3
Views: 4994
|
Forum: General Posted: Fri Jan 15, 2021 11:21 am Subject: Problem with Smarty and MYSQl - searching spaces |
Hello.
I've got a problem, and i'm not sure its a smarty issue, or PHP/MYSQL. I think its Smarty.
basically I am creating an online form, and everything works fdine - except for one thing.
... |
Topic: Can Smarty be used with Gzip? |
gordonisnz
Replies: 1
Views: 4391
|
Forum: General Posted: Thu Dec 31, 2020 12:18 am Subject: Can Smarty be used with Gzip? |
https://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/
Hi, Ive done a website speed test & it recommends gzipping my site for faster downloads. i found the above ... |
Topic: Find old templates when upgrading |
gordonisnz
Replies: 4
Views: 5411
|
Forum: General Posted: Sat Dec 12, 2020 8:12 am Subject: Find old templates when upgrading |
You first create acceptance tests. Then the problem is reduced to re-running the tests after each change.
What / How is an acceptance test
EDITED:-
In Dec 2020 I decide to upgrade my templa ... |
Topic: Find old templates when upgrading |
gordonisnz
Replies: 4
Views: 5411
|
Forum: General Posted: Sat Dec 12, 2020 8:11 am Subject: Find old templates when upgrading |
Ive created a PHP script to look for specific comments (a date) and sort the dates / template names..
But its not a smarty process. BUT will be useful if someone creates a routine within the Sma ... |
|