Link from sidebar to footer
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
You can modify any theme to meet your requirements and use code of the plugins in the footer template.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
I understood how to add categories:
but I still can't add useful links
Code: Select all
<?php foreach ($categories->db as $key=>$fields): ?>
<a href="<?php echo DOMAIN_CATEGORIES.$key; ?>"><?php echo $fields['name']; ?></a>
<?php endforeach ?>
For Categories:
How can I do this for the "Links"?
Code: Select all
<ul class="list-unstyled">
<?php $items = getCategories(); ?>
<?php foreach ($items as $category): ?>
<li><a href="<?php echo $category->permalink(); ?>"><?php echo $category->name(); ?></a></li>
<?php endforeach ?>
</ul>
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
There is a description in the documentation:
https://docs.bludit.com/en/dev-snippets/plugins
Sorry for not posting the link before.
https://docs.bludit.com/en/dev-snippets/plugins
Sorry for not posting the link before.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Thank you! Perfect!
Maybe someone will be useful:
Maybe someone will be useful:
Code: Select all
<footer>
<!-- Categories (plugin Categories must be activated) -->
<h5 class="text-uppercase font-weight-normal"><?php echo getPlugin('pluginCategories')->getValue('label'); ?></h5>
<ul>
<?php foreach (getCategories() as $category): ?>
<li><a href="<?php echo $category->permalink(); ?>"><?php echo $category->name(); ?></a></li>
<!-- Each category is an Category-Object -->
<!--
<li>Category name: <?php //echo $category->name(); ?></li>
<li>Category key: <?php //echo $category->key(); ?></li>
<li>Category description: <?php //echo $category->description(); ?></li>
<li>Category template: <?php //echo $category->template(); ?></li>
<li>Category link: <?php //echo $category->permalink(); ?></li>
<li>Category number of pages: <?php //echo count($category->pages()); ?></li>
-->
<?php endforeach ?>
</ul>
<!-- Useful Links (plugin Links must be activated) -->
<h5><?php echo getPlugin('pluginLinks')->getValue('label'); ?></h5>
<?php
$jsondb = getPlugin('pluginLinks')->getValue('jsondb', false);
$links = json_decode($jsondb);
?>
<ul>
<?php foreach( $links as $name=>$url ): ?>
<li><a href="<?php echo $url; ?>"><?php echo $name; ?></a></li>
<?php endforeach ?>
</ul>
</footer>