Tags + Archive Combination Page

7 views
Skip to first unread message

Michael Deckebach

unread,
Mar 15, 2021, 5:53:38 PMMar 15
to nikola-discuss
Hello there,

I am trying to modify the /archive/ pages (list_post.tmpl) in my theme so that it contains a list of all tags at the top (like you see in the default /categories/ page). I copy-pasted from tags.tmpl, which I believe is what contains the jinja code that generates the list of tags in a default /categories/ output, however it does not populate a list of tags as expected.

Essentially, I am trying to create a single page that has a list of links to all posts as well as a list of all tags for the aforementioned posts. Can anyone provide any help?

Thank you!
Michael

Chris Warrick

unread,
Mar 15, 2021, 7:05:44 PMMar 15
to Nikola—Discuss
I don’t think Nikola can provide anything like that on its own. You’d
need to write a (fairly simple) plugin that can expose this data to a
template and render it. Nikola only gives templates the variables they
need (so we don’t need to rebuild them when unrelated changes are
made).

--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

Roberto Alsina

unread,
Mar 15, 2021, 7:28:55 PMMar 15
to Nikola—Discuss
Could add a post list to the tags page instead, if don't want to code.
 
--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/CAMw%2Bj7J07%3Dh8J%2BgCn-zef6VQFOOQqrWVSO8dp1trWyYeKimAfA%40mail.gmail.com.

Michael Deckebach

unread,
Mar 17, 2021, 11:45:02 PMMar 17
to nikola-...@googlegroups.com
Oh wow, thank you both for the quick responses!

Sorry if I'm not understanding, but Roberto won't your suggestion to add a post list to the tags page have the inverse problem? I tried copying over the relevant pieces of list_post.tmpl into tags.tmpl, but it seems as though the necessary variables to generate a post list are not accessible within the tags page.

Again, thank you both so much for your help and sorry if I'm missing something obvious here. Not the end of the world if this isn't supported.

Best,
Michael



You received this message because you are subscribed to a topic in the Google Groups "nikola-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nikola-discuss/xk3e01v_I2w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/CALXDAfpJzqVb-OLHcHg54UrSSnhBp4QVmh30mh3MwWL65RYcjg%40mail.gmail.com.

Roberto Alsina

unread,
Mar 18, 2021, 4:18:38 AMMar 18
to Nikola—Discuss
On Thu, Mar 18, 2021 at 12:45 AM Michael Deckebach <michael....@gmail.com> wrote:
Oh wow, thank you both for the quick responses!

Sorry if I'm not understanding, but Roberto won't your suggestion to add a post list to the tags page have the inverse problem? I tried copying over the relevant pieces of list_post.tmpl into tags.tmpl, but it seems as though the necessary variables to generate a post list are not accessible within the tags page.

Again, thank you both so much for your help and sorry if I'm missing something obvious here. Not the end of the world if this isn't supported.

You are right, that probably won't work.

Plan B: https://plugins.getnikola.com/v7/static_tag_cloud/ and use it in the archive page? 
Reply all
Reply to author
Forward
0 new messages