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

Search found 1730 matches
Smarty Forum Index
Author Message
  Topic: Wrap something if var is true
AnrDaemon

Replies: 9
Views: 272

PostForum: General   Posted: Tue May 04, 2021 8:14 pm   Subject: Wrap something if var is true
My sincere apology, I somehow missed the href part.
Still, nobody stops you from wrapping your code into <a> tag and add href= attribute only if you have the link.
Sane CSS only highlight link ...
  Topic: Wrap something if var is true
AnrDaemon

Replies: 9
Views: 272

PostForum: General   Posted: Tue May 04, 2021 1:10 pm   Subject: Wrap something if var is true
Why is this nonsense? It wraps my code with an anchor which got the same size as my content

You literally just said that you wrapping a ship in an anchor. Sounds equally ridiculous.
Not to mention ...
  Topic: Wrap something if var is true
AnrDaemon

Replies: 9
Views: 272

PostForum: General   Posted: Tue May 04, 2021 7:54 am   Subject: Wrap something if var is true
So the HTML would be either this:

<a href="#">
<div>All my code</div>
</a>

Which is nonsense from HTML standpoint.
  Topic: Wrap something if var is true
AnrDaemon

Replies: 9
Views: 272

PostForum: General   Posted: Wed Apr 28, 2021 12:46 pm   Subject: Wrap something if var is true
<div>
{if $Data.tile_link}<a name="{$Data.tile_link}"/>{/if}
All my code
</div>

Or explain your needs from the beginning. WHAT do you ne ...
  Topic: Starting a user Session in Smarty
AnrDaemon

Replies: 1
Views: 102

PostForum: Smarty 3   Posted: Wed Apr 28, 2021 12:37 pm   Subject: Starting a user Session in Smarty
This is not a Smarty question. You start sessions in PHP, Smarty is solely for presentation purposes.
Consider it a glorified "printf" operator.
  Topic: Bug compile blocks with DefaultPluginHandler
AnrDaemon

Replies: 7
Views: 1315

PostForum: Bugs   Posted: Tue Apr 20, 2021 4:12 pm   Subject: Bug compile blocks with DefaultPluginHandler
I'll test it once I have some free time.
  Topic: my first plugin function - does file exist?
AnrDaemon

Replies: 1
Views: 380

PostForum: Plugins   Posted: Tue Apr 20, 2021 4:11 pm   Subject: my first plugin function - does file exist?
You've called PHP native function.
What you created is a template function {file_exists}.
Which is rather useless. You shouldn't check that in your template. More than that, you shouldn't ever make ...
  Topic: How to change years number in DropDown?
AnrDaemon

Replies: 3
Views: 356

PostForum: General   Posted: Sun Apr 18, 2021 8:58 am   Subject: How to change years number in DropDown?
No, you did not.

http://prntscr.com/11mnx2y
  Topic: HTML with class in variable not working
AnrDaemon

Replies: 2
Views: 371

PostForum: General   Posted: Sun Apr 18, 2021 8:53 am   Subject: HTML with class in variable not working
Because you are confusing Smarty and HTML.
{$selectedHeadline = "<h2 class="test">Hello</h2>"} is a Smarty syntax and you must exape double quotes like in PH ...
  Topic: How to change years number in DropDown?
AnrDaemon

Replies: 3
Views: 356

PostForum: General   Posted: Thu Apr 15, 2021 12:57 am   Subject: How to change years number in DropDown?
If nothing else helps, read the documentation.

https://www.smarty.net/docs/en/language.function.html.select.date.tpl
  Topic: Shopware Smarty Lagerbstandsabgleich
AnrDaemon

Replies: 3
Views: 943

PostForum: Language: German   Posted: Wed Apr 07, 2021 2:44 pm   Subject: Shopware Smarty Lagerbstandsabgleich
Sorry I did not see the question earlier.

Smarty is not a query language, Smarty is a template/presentation language. You query data in your PHP code and pass them to Smarty for display purposes.
...
  Topic: Frontend packages management in a smarty project
AnrDaemon

Replies: 2
Views: 484

PostForum: General   Posted: Sun Apr 04, 2021 4:56 pm   Subject: Frontend packages management in a smarty project
Try this article https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs-f695e9747b70
However, this is not really a Smarty question.
  Topic: Caching with Smarty - A few best practice questions
AnrDaemon

Replies: 2
Views: 375

PostForum: General   Posted: Sun Apr 04, 2021 4:53 pm   Subject: Caching with Smarty - A few best practice questions
That's basically the only way to do it.
Carefully inspect your code, group stuff that only calculate template variables, and wrap it into if(!isCached()) block.
  Topic: Bitwise operations
AnrDaemon

Replies: 1
Views: 642

PostForum: General   Posted: Wed Mar 31, 2021 1:28 pm   Subject: Bitwise operations
It would be splendid, if you could create an issue on github for this problem. And double so if you could make a regression test case.
  Topic: Bug compile blocks with DefaultPluginHandler
AnrDaemon

Replies: 7
Views: 1315

PostForum: Bugs   Posted: Thu Mar 25, 2021 2:17 pm   Subject: Bug compile blocks with DefaultPluginHandler
Please fork the https://github.com/AnrDaemon/test-001/ , create a new branch from master and reproduce your issue.
Link the results here.
 
Page 1 of 116 Goto page 1, 2, 3 ... 114, 115, 116  Next
All times are GMT
Jump to:  


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