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

[EPIC] Theme Helpers #389

Closed
24 of 25 tasks
JohnONolan opened this issue Aug 11, 2013 · 12 comments
Closed
24 of 25 tasks

[EPIC] Theme Helpers #389

JohnONolan opened this issue Aug 11, 2013 · 12 comments
Assignees
Milestone

Comments

@JohnONolan
Copy link
Member

This is an epic issue for all the theme helper issues in Milestone 0.3. It is assigned to me because it's purely here for keeping track of the individual issues. I will probably keep adding to it and I doubt it will be closed until 0.3 is complete.

Remove helpers

Name change requests #381

  • {{dateFormat}} => {{date}}

Would also like an option to return date in format: 12 Aug 2013

  • {{paginate}} => {{pagination}}

New helper requests

Globals #172

  • {{@blog.title}}
  • {{@blog.description}}
  • {{@blog.url}} - The base url of the blog
  • {{@blog.logo}}
  • {{@blog.cover}} - Blog cover image
  • {{@blog.themedir}} - Url of the active theme directory

Post Data #528

  • {{url}} - The permalink

Next Post (Punted to 0.4)

  • {{nextpost}} - Queries Ghost for the next newest post after the current one. If no newer post exists, it returns the next oldest post after the current one.

Previous Post

  • {{previouspost}} - Queries Ghost for the next oldest post after the current one. If no older post exists, it returns the next newest post after the current one.

Author Data #358

  • {{author.name}} - Returns user's firstname+lastname (this is .full_name for now)
  • {{author.email}}
  • {{author.url}} - URL field from user settings
  • {{author.image}} - Profile picture
  • {{author.cover}} - Cover image
  • {{author.bio}}
  • {{author.profile}} - URL to user's public profile / list of posts

Tags #369

  • {{tags}} - Should put both tags, as well as link to tag archives

Header / Footer for scripts / styles #382

  • {{ghost_header}}
  • {{ghost_footer}}

Class lists #472

  • {{body_class}} - Handy classes on the body tag
  • {{post_class}} - Handy classes on the post container tag

Excerpt #471

  • sanitise {{content}} / {{excerpt}}
@cgiffard
Copy link
Contributor

I'll attack the author data part, since it overlaps with my current issue #358. If I get that finished I might have a stab at the rest.

@ghost ghost assigned ErisDS Aug 12, 2013
@ErisDS
Copy link
Member

ErisDS commented Aug 12, 2013

This is an epic... I've updated it to make that a little clearer, but we haven't finished opening all these issues yet ;)

@ErisDS
Copy link
Member

ErisDS commented Aug 18, 2013

@JohnONolan What is the expected behaviour / output of {{url}}, {{nextpost}} and {{previouspost}} ? An absolute URL? A relative URL? A pre-populated anchor tag?

@JohnONolan
Copy link
Member Author

What is the expected behaviour / output of {{url}}, {{nextpost}} and {{previouspost}} ? An absolute URL? A relative URL? A pre-populated anchor tag?

An absolute url

@JohnONolan JohnONolan mentioned this issue Sep 2, 2013
8 tasks
ErisDS added a commit to ErisDS/Ghost that referenced this issue Sep 2, 2013
issue TryGhost#389

 - Upgrade express-hbs to get template options access
 - Grab config & settings with a hacky new method in ghost & pass to template options
 - Settings are no longer passed to res.locals
ErisDS added a commit to ErisDS/Ghost that referenced this issue Sep 2, 2013
issue TryGhost#389

 - Temporary aliases for user model, schema will be changed soon, in the meantime we want themes to be built using the right properties
@ErisDS
Copy link
Member

ErisDS commented Sep 2, 2013

Soooo close!

@JohnONolan
Copy link
Member Author

🎈 ❕

@ErisDS
Copy link
Member

ErisDS commented Sep 9, 2013

{{author.image}} - Profile picture

{{author.cover}} - Cover image

These are currently available but are

{{author.profile_picture}} and {{author.cover_picture}}

Would you like them 1) aliased from the model or 2) changed on the model (i.e. in #632)?

@JohnONolan
Copy link
Member Author

Yeah, modal to 'image' and 'cover' then I think

@ErisDS
Copy link
Member

ErisDS commented Sep 9, 2013

shall I also change email_address to email? It's just email in settings so I think it is a very good idea.

@JohnONolan
Copy link
Member Author

👍

ErisDS added a commit that referenced this issue Sep 9, 2013
issue #389

- Output only aliases (saving data with these keys won't work) gives us the right names in the theme API
@ErisDS
Copy link
Member

ErisDS commented Sep 9, 2013

Aliases are in place for {{author.image}} and {{author.cover}}.

Slug/Profile doesn't exist yet, also it's worth noting that the {{url}} helper would be expected to provide the correct url in the author context.. it clashes with the authors provided URL at the moment but this will be fixed. Thus if we added {{author.profile}} it would do the same thing as {{url}}?

@ErisDS
Copy link
Member

ErisDS commented Sep 9, 2013

Everything except user profile is done. user.profile or {{url}} should be done when profiles are added.

@ErisDS ErisDS closed this as completed Sep 9, 2013
daniellockyer pushed a commit that referenced this issue Jul 20, 2022
refs https://github.com/TryGhost/Team/issues/1519

- Added offer repository dependency to member repository (offerAPI didn't work because it creates a new transaction that resulted in a deadlock during tests)
- Store the offer id from the Stripe subscription metadata in the subscription (only if the discount is still active)
- Also added the offer id to the metadata for a Stripe coupon, this will make adding and removing coupons a bit more foolproof
- Prefer the usage of the offer metadata from a coupon if it is present
- When no discount is applied to a subscription, it always sets the offer id to null, even when the metadata still contains the offer
- The offer_id remains stored when a subscription is canceled/expired
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

3 participants