diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-30 05:03:23 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-30 05:03:23 +0300 |
| commit | 4f2d900af7636e6744ae14aeeefdf2d6080ac50a (patch) | |
| tree | 1f80775437510591656e6ef13375516226ed27f3 /html/app/views/components/breadcrumbs.php | |
| parent | a16d070c4f8301a8b68220aca6d3573705be9025 (diff) | |
| download | classroom-4f2d900af7636e6744ae14aeeefdf2d6080ac50a.tar.gz classroom-4f2d900af7636e6744ae14aeeefdf2d6080ac50a.tar.bz2 classroom-4f2d900af7636e6744ae14aeeefdf2d6080ac50a.zip | |
several mail options tested; mailhog (fake) mailer is working
Diffstat (limited to 'html/app/views/components/breadcrumbs.php')
| -rw-r--r-- | html/app/views/components/breadcrumbs.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/html/app/views/components/breadcrumbs.php b/html/app/views/components/breadcrumbs.php new file mode 100644 index 0000000..471cfb6 --- /dev/null +++ b/html/app/views/components/breadcrumbs.php @@ -0,0 +1,30 @@ +<?php +/** breadcrumbs + * ----------------------------------------------------------------------------- + * + * imported variables + * --- + * @param $id : category_id of last level + * @param $title : category title of last level + * @param $parents : array of parent nodes + * ----------------------------------------------------------------------------- + */ +?> + +<div class="breadcrumb"> + <!-- home --> + <a href="/">Classroom</a> + + <!-- parent nodes --> + <?php if ($id != 0) : ?> + <?php foreach($parents as $node) : ?> + <i class="fas fa-angle-right"></i> <a href="/wiki/category?id=<?=$node['id']?>"><?=$node['title']?></a> + <?php endforeach; ?> + <?php endif; ?> + + <!-- last (current) node --> + <?php if ($id != 0) : ?> + <i class="fas fa-angle-right"></i> <a href="/wiki/category?id=<?=$id?>"><?=$title?></a> + <?php endif; ?> + +</div>
\ No newline at end of file |
