website/public/docs/v3.1.4/Reference/PHP/VV/root.php
vlw 7a8fc36ec0 feat: new website design and update to Vegvisir 3.1 (#2)
Brand new design for the website following the new design language I used for [version 2.0 of my personal website](https://codeberg.org/vlw/vlw.se/releases/tag/2.0.0).

Reviewed-on: https://codeberg.org/vegvisir/website/pulls/2
Co-authored-by: vlw <victor@vlw.se>
Co-committed-by: vlw <victor@vlw.se>
2025-03-05 11:16:54 +00:00

36 lines
No EOL
1.3 KiB
PHP

<?= VV::include("public/docs/v3.1.4/Reference/layout") ?>
<main>
<section>
<h1>VV::root()</h1>
<p>Return an absolute path to any resource relative to <a href="/docs/v3.1.4/Reference/Env#root_path"><code>root_path</code></a>.</p>
</section>
<section>
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.4/PHP/VV/root/description") ?>
</section>
<section>
<h1>Parameters</h1>
</section>
<section class="md param">
<h3><code class="mtk6">string</code></h3>
<h2><code class="mtk10">$pathname</code></h2>
<p>Path to any resource relative from <a href="/docs/v3.1.4/Reference/Env#root_path"><code>root_path</code></a>.</p>
<p>Passing an empty string or nothing to this method will return an absolute path to the root folder itself.</p>
</section>
<section>
<h1>Return value</h1>
</section>
<section>
<h3><code class="mtk6">string</code></h3>
<p>Returns a string with an absolute pathname from a relative pathname passed to <code class="mtk10">$pathname</code>.</p>
</section>
<hr>
<section>
<h1>Examples</h1>
</section>
<section>
<h2>Check if an SVG file exists before embedding</h2>
</section>
<section>
<?= VV::include("snippets/HTMLCodeDemoElement/HTMLCodeDemoElement?id=docs/v3.1.4/PHP/VV/root/example_import") ?>
</section>
</main>