Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Post History

60%
+1 −0
Q&A With Datenstrom Yellow SSG, how do I generate lists of tags and recent posts for my blog?

The answer turns out to be to add a sidebar, which is a separate element. First, you have to use the Berlin theme, not the default. This theme adds a line to system/layouts/default.html: <div...

posted 3y ago by Monica Cellio‭

Answer
#1: Initial revision by user avatar Monica Cellio‭ · 2021-09-27T02:49:03Z (about 3 years ago)
The answer turns out to be to add a sidebar, which is a separate element.  First, you have to use the Berlin theme, not the default.  This theme adds a line to `system/layouts/default.html`:

    <div class="<?php echo "content".($this->yellow->page->isPage("sidebar") ? " with-sidebar" : "") ?>">

For some reason the blog templates don't get updated when you switch to this theme, so edit that line into `blog.html` and `blogpages.html`.

Next, you need to create the actual sidebar page.  In the `shared` content folder, add `sidebar.md` as in the following example:

    ---
    Title: Sidebar
    Status: shared
    BlogLocation: /blog/
    BlogNewLocation: /blog/@year/@month
    ---

    Tags

    [blogtags /blog/ 10]

    Archive

    [blogarchive /blog/ 50]



In `blogtags` and `blogarchive`, the last argument is the number of entries to show.  I haven't yet figured out how to show all tags, or all archive months, on one page.

These changes add the sidebar to all pages on the web site.  Mine is, first and foremost, a blog, but if you have other types of content in their own sections, you might not want your blog archives to show up in, say, your portfolio.  I suspect that deleting that line from `default.html`, so only the blog templates have it, would accomplish that, but I haven't tried it.