Skip to content

Adds tag pages#2185

Merged
ErisDS merged 1 commit intoTryGhost:masterfrom
hswolff:tag-pages
Feb 18, 2014
Merged

Adds tag pages#2185
ErisDS merged 1 commit intoTryGhost:masterfrom
hswolff:tag-pages

Conversation

@hswolff
Copy link
Contributor

@hswolff hswolff commented Feb 13, 2014

fixes #2111

  • modified Post model to support a tag query
    param that will filter the desired post collection
    to only include posts that contain the requested tag
  • in the updated Post model it includes the Tag model
    under a nested object called 'aspects'
  • added tests for updated Post model, updating
    test utils to add more posts_tags relations
  • adds two new routes to frontend,
    one for initial tag page,
    another to page that tag page
  • for tag pages the array of posts
    is exposed to the view similarly
    to the homepeage
  • on the tag view page the information
    for the tag is also accessible
    for further theme usage
  • the tag view page supports a hierarchy of
    views, it'll first attempt to use a tag.hbs
    file if it exists, otherwise fall back
    to the default index.hbs file
  • modified pageUrl and pagination helper
    to have it be compatible with tag paging
  • added unit tests for frontend controller
  • added unit tests for handlebar helper modifications
  • add functional tests for new tag routes

@halfdan
Copy link
Contributor

halfdan commented Feb 13, 2014

👍 Nice work!

@alicoding
Copy link
Contributor

This is super @hswolff !!

@ErisDS
Copy link
Member

ErisDS commented Feb 18, 2014

Apart from that one little buggle this all looks 👍 🍰

fixes TryGhost#2111

- modified Post model to support a tag query
  param that will filter the desired post collection
  to only include posts that contain the requested tag

- in the updated Post model it includes the Tag model
  under a nested object called 'aspects'

- added tests for updated Post model, updating
  test utils to add more posts_tags relations

- adds two new routes to frontend,
  one for initial tag page,
  another to page that tag page

- for tag pages the array of posts
  is exposed to the view similarly
  to the homepeage

- on the tag view page the information
  for the tag is also accessible
  for further theme usage

- the tag view page supports a hierarchy of
  views, it'll first attempt to use a tag.hbs
  file if it exists, otherwise fall back
  to the default index.hbs file

- modified pageUrl and pagination helper
  to have it be compatible with tag paging

- added unit tests for frontend controller

- added unit tests for handlebar helper modifications

- add functional tests for new tag routes
@hswolff
Copy link
Contributor Author

hswolff commented Feb 18, 2014

Thanks for the review! Great catch! :D

Pushed fix for that.

ErisDS added a commit that referenced this pull request Feb 18, 2014
@ErisDS ErisDS merged commit 6992e99 into TryGhost:master Feb 18, 2014
@halfdan
Copy link
Contributor

halfdan commented Feb 18, 2014

👍

@hswolff hswolff deleted the tag-pages branch February 18, 2014 21:15
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

Successfully merging this pull request may close these issues.

[Feature] Tag pages

4 participants