Closed ostafinskim closed 4 months ago
Thanks for the good description on this ticket @ostafinskim it's really helpful.
The changes look good to me. The only concern I have is whether the client might add a $exhibition['exhibition_url']
for the Rembrandt exhibition at some point? Doing so would break this functionality.
Thanks for the good description on this ticket @ostafinskim it's really helpful.
The changes look good to me. The only concern I have is whether the client might add a
$exhibition['exhibition_url']
for the Rembrandt exhibition at some point? Doing so would break this functionality.
Hi Sean,
I have had the same concerns, however I am not too sure about how this can be achieved other way, as this needs to work only on the one particular url ( slug ) and it's beyond my control as customer sets it up in CMS. 🤔
I am happy to edit this to make it more bullet proof.
Hi @ostafinskim ,
I think this would work:
@if ($exhibition['slug'] == 'rembrandt-rubens-van-dyck')
<a href="{{ url('support-us/make-a-donation') }}" class="cta-btn">
Donate now
@svg('fas-chevron-right', ['width' => '16px', 'height' => '16px', 'color' => '#fff'])
</a>
@elseif(!empty($exhibition['exhibition_url']))
<a href="{{ $exhibition['exhibition_url'] }}" class="cta-btn">
Book now
@svg('fas-chevron-right', ['width' => '16px', 'height' => '16px', 'color' => '#fff'])
</a>
@else
<p class="cta-btn">Tickets available soon...</p>
@endif
Basically you check for the Rembrandt exhibition first, and then after that you fallback to the previous default behaviour.
Hi @sean-dunwoody,
Thanks for this.
I have updated this PR.
Thanks Miro, that all looks good to me now 👍
https://studio24.zendesk.com/agent/tickets/14354
https://fitzmuseum.studio24.dev/plan-your-visit/exhibitions/rembrandt-rubens-van-dyck