문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top