You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CommentTemplate bietet intelligente Pfad-Behandlung für relative und absolute Pfade:
80
+
81
+
### Öffentlicher Pfad
82
+
83
+
Der **Öffentliche Pfad** ist das Wurzelverzeichnis Ihrer Webanwendung, typischerweise wo sich `index.php` befindet. Dies ist das Document Root, von dem Webserver Dateien bereitstellen.
84
+
85
+
```php
86
+
// Beispiel: wenn Ihre index.php bei /var/www/html/myapp/index.php liegt
{$content|striptag|trim|escape} <!-- Mehrere Filter ketten -->
233
310
```
234
311
312
+
### Kommentare
313
+
314
+
Template-Kommentare werden vollständig aus der Ausgabe entfernt und erscheinen nicht im finalen HTML:
315
+
316
+
```html
317
+
{* Dies ist ein einzeiliger Template-Kommentar *}
318
+
319
+
{*
320
+
Dies ist ein mehrzeiliger
321
+
Template-Kommentar
322
+
über mehrere Zeilen
323
+
*}
324
+
325
+
<h1>{$title}</h1>
326
+
{* Debug-Kommentar: Prüfen ob title-Variable funktioniert *}
327
+
<p>{$content}</p>
328
+
```
329
+
330
+
**Hinweis**: Template-Kommentare `{* ... *}` unterscheiden sich von HTML-Kommentaren `<!-- ... -->`. Template-Kommentare werden während der Verarbeitung entfernt und erreichen nie den Browser.
CommentTemplate provides intelligent path handling for both relative and absolute paths:
80
+
81
+
### Public Path
82
+
83
+
The **Public Path** is the root directory of your web application, typically where `index.php` resides. This is the document root that web servers serve files from.
84
+
85
+
```php
86
+
// Example: if your index.php is at /var/www/html/myapp/index.php
Template comments are completely removed from the output and won't appear in the final HTML:
315
+
316
+
```html
317
+
{* This is a single-line template comment *}
318
+
319
+
{*
320
+
This is a multi-line
321
+
template comment
322
+
that spans several lines
323
+
*}
324
+
325
+
<h1>{$title}</h1>
326
+
{* Debug comment: checking if title variable works *}
327
+
<p>{$content}</p>
328
+
```
329
+
330
+
**Note**: Template comments `{* ... *}` are different from HTML comments `<!-- ... -->`. Template comments are removed during processing and never reach the browser.
0 commit comments