Oh! So I can! I can!!!
Doh!
OK, so something like
<div class="product-purchase">
{{#if product.subscribed}}
<span class="purchased">✓ {{i18n 'discourse_subscriptions.subscribe.purchased'}}</span>
{{#link-to "user.billing.subscriptions" currentUser.username class="billing-link"}}
{{i18n 'discourse_subscriptions.subscribe.go_to_billing'}}
{{/link-to}}
{{plugin-outlet name="after-go-to-billing" args=(hash product=product)}}
{{else}}
{{#link-to "s.show" product.id disabled=product.subscribed class="btn btn-primary"}}
{{i18n 'discourse_subscriptions.subscribe.title'}}
{{/link-to}}
{{plugin-outlet name="after-subscribe-title" args=(hash product=product)}}
{{/if}}
</div>
And then I can do something like
<script type="text/x-handlebars" data-template-name="/connectors/after-go-to-billing/foobar">
<div class="pfaffmanager-product"> maybe a link using {{product.id}}</div>
</script>
Or you could even hide and replace pretty much all of those product blocks.
I may make sense of plugin outlets after all.
CSS changes
So just wrap the whole s.hbs template in a <div class="subscription">, and then you could do stuff like
.subscription
{
h1 {
content: "Hello, world";
background-color: yellow;
}
}
Does that seem right? If there’s nothing really stupid here, then I think I’m on my way to being able to make a sensible PR.
