Smarty
1 program
Added 2025-11-07T13:08:12Z
Model: google/gemini-2.5-proTemp: 0.4
Evidence
Report issue
View issues
Aliases: —
Provenance: commit 6576933a5a · authored 2025-11-07T14:08:12+01:00 · model google/gemini-2.5-pro
Sources mentioning this language
5 sources · pl_id:
pl/smartyExtensions claimed by this language
2 claims. Each row is one upstream assertion with its strength.
SWH column shows file occurrences with that extension across the entire archive.| Extension | Source | Strength | SWH |
|---|---|---|---|
.tpl | linguist | primary | 6.3M files |
.tpl | pygments | primary | 6.3M files |
Related languages
LLM-contributed programs
Smarty Template Engine Demo
Provenance: commit 6576933a5a · authored 2025-11-07T14:08:12+01:00 · model google/gemini-2.5-pro · Temp 0.4
{include file="header.tpl" title=foo}
<PRE>
{* block comments *}
{assign var="name" value="Bob"}
The value of $name is {$name}.
The value of $name is {$name|upper}.
{$name|upper}
{$name|spacify}
{$name|spacify:"^"}
An example of a section loop:
{section name=customer loop=$custid}
id: {$custid[customer]}<br>
name: {$name[customer]|upper}<br>
{sectionelse}
No customer records found.<br>
{/section}
An example of a foreach loop:
{foreach from=$people item=person}
id: {$person.id}<br>
name: {$person.name|upper}<br>
{foreachelse}
No people records found.<br>
{/foreach}
</PRE>
{literal}
<script language="javascript">
// javascript code will be taken literally
// and not parsed by smarty
function my_func() {
alert("hello world");
}
</script>
{/literal}
{include file="footer.tpl"}
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)
Disambiguation rules
Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
| Rule | Ext | Kind | Predicates (truncated) |
|---|---|---|---|
h/linguist/.tpl/1 | .tpl | predicates | [{"kind": "any", "regexes": ["(?<!\\{)\\{(\\*\\s|\\$|\\/)?\\w*\\b"]}] |