Search code examples
phphtmltemplatescurly-braces

Why am I seeing curly braces in this code?


I'm looking at someone else's HTML, and I see that all strings are output within curly braces.

Here's an example from the HTML document:

<td><div style="padding-top:10px; padding-bottom:10px" align="center">{_no_feedback_activity_found}</div></td>

What would be the purpose/advantage for doing things this way? Also, when the HTML is parsed, how does it access the actual string?

Please help me understand this concept... What exactly is going on with this document?


Solution

  • The controller or whichever framework you are using, has a variable by the name _no_feedback_activity_found sent to this template. This is useful, when you have a designer work on the templating and a developer working on the framework, so the designer doesn't need to worry about the code.