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

Handling multiple tags in pagination collection #708

Closed
saenglert opened this issue Sep 23, 2019 · 2 comments
Closed

Handling multiple tags in pagination collection #708

saenglert opened this issue Sep 23, 2019 · 2 comments
Milestone

Comments

@saenglert
Copy link
Contributor

saenglert commented Sep 23, 2019

Hello everyone,
I'm trying to work with Pagination and I would like to pass a collection of data that contains multiple tags.

Example:

pagination:
    data: collections.news

Takes every item with the tag new.

What I would like to do is something akin to:

pagination:
    data: collections.getByTagNames("news", "domestic")

Which would return all items that have both the news and domestic tag.

I know that I can add custom collections via the config or add a custom filter. #608

However, both solutions are somewhat impractical to me:

  • Custom Collection: If another tag gets added I need to also add a new collection that includes this tag and also add every possible combination collection of the tags for filtering.
  • Custom Filter: As data is a string I can't make function calls at this point in frontmatter and if I use the filter later in the template pagination is off because the pagination result and filter result possibly don't match any more.

I've noticed #397 proposed (to my understanding) exactly this earlier this year. Has anything come of that?

@zachleat
Copy link
Member

We can close this out because #711 was merged, yeah?

@zachleat zachleat added this to the Next Minor Version milestone Dec 20, 2019
@zachleat zachleat modified the milestones: Next Minor Version, v0.10.0 Jan 4, 2020
@zachleat
Copy link
Member

zachleat commented Jan 4, 2020

Closing, this will be available in 0.10.0-beta.2

@zachleat zachleat closed this as completed Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants