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 13 matches
Smarty Forum Index
Author Message
  Topic: Why "Smarty" team do not update website design?
macblack77

Replies: 22
Views: 20611

PostForum: General   Posted: Sat Jul 28, 2018 12:52 pm   Subject: Why "Smarty" team do not update website design?
I use smarty on a daily basis and love it, its easy to use, powerful, plays nicely with my IDE and is well established.

However, trying to convince anyone to use or switch to Smarty is impossible w ...
  Topic: assign v assignByRef
macblack77

Replies: 4
Views: 5834

PostForum: General   Posted: Wed Sep 28, 2016 1:37 pm   Subject: assign v assignByRef
I didn't get that?? Are you saying you agree with me?

I thought it was a perfectly valid question?

Surely there's an efficiency gain (stack/heap processing) in only passing the reference to smar ...
  Topic: assign v assignByRef
macblack77

Replies: 4
Views: 5834

PostForum: General   Posted: Wed Sep 28, 2016 11:55 am   Subject: assign v assignByRef
I read the documentation before posting and if you note I did say "just curious".

I was asking if byref was more efficient?
  Topic: assign v assignByRef
macblack77

Replies: 4
Views: 5834

PostForum: General   Posted: Wed Sep 28, 2016 9:21 am   Subject: assign v assignByRef
noob question,

Just curious, but is assignByRef more efficient than assign?

Does smarty access the byref variables directly as opposed to taking a copy of them when you use assign?
  Topic: Accessing class constants
macblack77

Replies: 17
Views: 19117

PostForum: General   Posted: Fri May 06, 2016 11:54 am   Subject: Accessing class constants
Thank you, that example really helps.
  Topic: Accessing class constants
macblack77

Replies: 17
Views: 19117

PostForum: General   Posted: Thu May 05, 2016 9:40 pm   Subject: Accessing class constants
http://lmgtfy.com/?q=why%20MVC%20is%20bad%20for%20web

"MVC" is an overloaded acronym. As a classic pattern, MVC is only applicable when you control all three instances in same code. For w ...
  Topic: Accessing class constants
macblack77

Replies: 17
Views: 19117

PostForum: General   Posted: Thu May 05, 2016 12:34 pm   Subject: Accessing class constants

If it helps, here is the markup:


{if $notice->type==$notice::NEWLISTING}
<h3>NEW LISTING</h3>
{elseif $notice->type==$notice::REGISTRATION& ...
  Topic: Accessing class constants
macblack77

Replies: 17
Views: 19117

PostForum: General   Posted: Fri Apr 29, 2016 11:36 am   Subject: Accessing class constants
I'm using v 3.1.27, I'll update when I get the chance.

If it helps, here is the markup:


{if $notice->type==$notice::NEWLISTING}
<h3>NEW LISTING</h3>
{ ...
  Topic: Accessing class constants
macblack77

Replies: 17
Views: 19117

PostForum: General   Posted: Thu Apr 28, 2016 9:02 am   Subject: Accessing class constants
Constants ARE static, per definition.

It would be overkill to separate these into individual templates, so instead they are all in one with the class constant used to determine which message block ...
  Topic: Accessing class constants
macblack77

Replies: 17
Views: 19117

PostForum: General   Posted: Wed Apr 27, 2016 11:02 am   Subject: Accessing class constants
Have you tried something like

{CLASS::CONSTANT}

Thank you that worked! I don't understand it though. I thought only static members are accessed by class?
  Topic: Accessing class constants
macblack77

Replies: 17
Views: 19117

PostForum: General   Posted: Wed Apr 27, 2016 10:47 am   Subject: Accessing class constants
To me, it sounds like you are trying to place business logic into template.
Are you absolutely sure you can't express this structure in any other way?

Perhaps, I don't claim to be a MVC expert, bu ...
  Topic: Accessing class constants
macblack77

Replies: 17
Views: 19117

PostForum: General   Posted: Mon Apr 25, 2016 10:00 am   Subject: Accessing class constants
OK, so I found a workaround for now, but I don't understand it.

In the template I have a series of if..elseif statements. If I replace the elseif with individual if's the code works fine??
  Topic: Accessing class constants
macblack77

Replies: 17
Views: 19117

PostForum: General   Posted: Mon Apr 25, 2016 9:49 am   Subject: Accessing class constants
Newb here, can someone tell me how I should be accessing class constants?

I have a notification class which can be in any of 20+ states, the current state is determined using constants (so I have 2 ...
 
Page 1 of 1
All times are GMT
Jump to:  


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