아! 그러면 되는 거군요! 할 수 있다!!!
아뿔사!
자, 그러면 이런 식으로 하면 되겠죠
<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>
그리고 나서 이런 식으로 할 수 있겠네요
<script type="text/x-handlebars" data-template-name="/connectors/after-go-to-billing/foobar">
<div class="pfaffmanager-product"> 아마도 {{product.id}}를 사용한 링크일 겁니다</div>
</script>
아니면 그 제품 블록의 거의 모든 것을 숨기고 대체하는 것도 가능합니다.
결국 플러그인 아웃렛이 뭔지 이해하게 될지도 모르겠네요.
CSS 변경 사항
그냥 s.hbs 템플릿 전체를 <div class="subscription">으로 감싸고, 그런 다음 이렇게 하면 됩니다
.subscription
{
h1 {
content: "Hello, world";
background-color: yellow;
}
}
이렇게 하면 될까요? 여기에서 정말 멍청한 부분이 없다면, 합리적인 PR을 만들 수 있는 방향으로 나아가고 있다고 생각합니다.
