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

Make tagged documents data available as global data. #350

Closed
manikmagar opened this issue May 8, 2017 · 3 comments
Closed

Make tagged documents data available as global data. #350

manikmagar opened this issue May 8, 2017 · 3 comments

Comments

@manikmagar
Copy link
Member

As of now, only alltags is available globally and it only contains String list of tag names. For one of the blogs, on home page, I want to show number of documents in each tag, which doesn't seem possible or easily achievable. May be alltags can return list of Tag model where Tag object could be a map of { "name" : "test", "noOfDocuments": 30, page-url: "{name/sanitizedname}"} or more elements.

I can write a script in template to iterate over published_posts or published_content and then get the stats but that will slow down rendering along with adding other scripting complexities to templates.

P.S. I actually wanted to show categories and their post count but until #293 is available in release, I am choosing tags. Although, even categories then should be made available globally with more data elements.

@manikmagar
Copy link
Member Author

For the number of tagged posts, this one seems to be duplicate of #216 .

@manikmagar
Copy link
Member Author

Accidentally closed it while adding previous comment, I will keep it open for review to see if more data about tags should be exposed? I am going to use the solution specified in #216 .

@ancho
Copy link
Member

ancho commented May 11, 2017

Jup. That would be nice. I think a refactoring to a better data model abstraction is the right way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants