Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing cross-classification navigation #2598

Closed
wants to merge 5 commits into from

Conversation

@felixfontein
Copy link
Contributor

felixfontein commented Dec 17, 2016

Inserts links to previous/parent/next pages/Atom/RSS to context for taxonomy classification pages.

This allows to implement #1639 with the following variables:

  • previous_archive*: whatever archive entry comes before this one (sorted alphabetically; this is more useful for tags or other classifications than for archives);
  • next_archive*: whatever archive entry comes before this one (sorted alphabetically; this is more useful for tags or other classifications than for archives);
  • previous_archive_sibling*: for months, the previous month in this year (or None if there is none); same for years and days;
  • next_archive_sibling*: for months, the next month in this year (or None if there is none); same for years and days;
  • previous_archive_samelevel*: for months, the previous month in this year or the previous years (or None if there is none); same for years and days;
  • next_archive_samelevel*: for months, the next month in this year or the previous years (or None if there is none); same for years and days;
  • parent_archive*: for months, the year; for years, the global archive; and for days, the month.

Here, * can be replaced with nothing (to get classification identifier), _name for a friendly name (like 'May 2015'), _link for a link to the classification page, _atom for a link to the Atom feed for this classification, and _rss for a link to the RSS feed for this classification.

I haven't modified any templates yet; whoever wants to do this, feel free.

Also, nothing is added to Atom feeds (as @da2x suggested in #1639) since I have no idea how it should/could be added there.

@Kwpolska
Copy link
Member

Kwpolska commented Dec 17, 2016

This is far too overcomplicated.

@felixfontein
Copy link
Contributor Author

felixfontein commented Dec 17, 2016

(The code concerning translations for '{month} {year}' and '{month} {day}, {year}' should be adjusted and these variables should be added to transiflex before this PR is merged.)

@felixfontein
Copy link
Contributor Author

felixfontein commented Dec 17, 2016

Why? It is too complicated for only archives maybe, but not too complicated if you want to use it for other taxonomies as well (like sections, tags, categories, ...).

@Kwpolska
Copy link
Member

Kwpolska commented Dec 17, 2016

How useful would that be though? I don’t think it would. You can’t reasonably do it all for any other taxonomies, since those are unordered. For hierarchies (categories), getting a link to the parent is perfectly reasonable (and should be really simple), but even then there’s no “next category” or whatever

The solution should be much simpler. To me, this looks like 141 lines of gibberish code.

@felixfontein
Copy link
Contributor Author

felixfontein commented Dec 17, 2016

There's always the same order which will appear on the taxonomy overview page, which is perfectly fine for me.

@Kwpolska
Copy link
Member

Kwpolska commented Dec 17, 2016

What happens when you add a new tag, which can happen pretty often on some blogs? Rebuilding pages just to fix a link only a handful of people would use, and that makes no sense for anything larger?

@felixfontein
Copy link
Contributor Author

felixfontein commented Dec 17, 2016

We could enable it optionally for taxonomies, so that by default that isn't added. Then the default tag plugin could disable it (or have a setting for that, or whatever).

@felixfontein felixfontein force-pushed the allowing-cross-classification-navigation branch from 4058d37 to b2d218b Dec 25, 2016
@felixfontein
Copy link
Contributor Author

felixfontein commented Dec 25, 2016

Rebased to account for the commit already merged. Closing for now as this doesn't have a chance to be merged.

@Kwpolska Kwpolska deleted the allowing-cross-classification-navigation branch May 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.