Question

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?

Was it helpful?

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.

OTHER TIPS

It appears that they are using a templating system (like smarty, twig, etc.), and somehow it isn't working. There isn't any other known concept or reason for doing this except for substituting variable names in a templating system.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top