Closed jdblischak closed 3 years ago
@DaveParr Bumping this PR
Thanks for raising this, you are right, this functionality would be beneficial.
The complexity here is that we have multiple ticket providers, and this solution only supports the fuctionality if eventbrite is the one that is being used. In Cardiff we tend to use TiTo, and we have used ticket tailor in the past.
A 'general' solution would be nice to take this link to any registration provider that would be active. The possible options that are in IRL also include 'no' registration by setting all registration options to enable = false
.
A potential simple solution might be to extend your current pattern to include this in the PR:
{{ if .Site.Params.eventbrite.enable }}
<li>
<a class="page-scroll" href="{{ .Site.BaseURL }}#eventbrite">{{ with .Site.Params.navigation.eventbrite }}{{ . }}{{ end }}</a>
</li>
{{ end }}
{{ if .Site.Params.tickettailor.enable }}
<li>
<a class="page-scroll" href="{{ .Site.BaseURL }}#tickettailor">{{ with .Site.Params.navigation.tickettailor }}{{ . }}{{ end }}</a>
</li>
{{ end }}
{{ if .Site.Params.tito.enable }}
<li>
<a class="page-scroll" href="{{ .Site.BaseURL }}#tito">{{ with .Site.Params.navigation.tito }}{{ . }}{{ end }}</a>
</li>
{{ end }}
What do you think @jdblischak ?
As far as I currently see the only hassle with this would be that the 'Registration' button would currently exist multiple times on the demo site, but that can easily be changed.
There might be some alternative that would check if any of the registration providers were on and route it to the 'top' one, but that seems a bit like overkill as I can't imagine a scenario where multiple ticket providers are active except on the example.
Another idea: change the template files for the registration providers so that they all use id="registration"
. Then the navbar link could be shared between them, i.e. href="{{ .Site.BaseURL }}#registration">
. I think in the edge case of the template where multiple registration vendors are enabled, the link would take you to the first div with a matching id.
Thanks @jdblischak as always.
That sees like a good solution. I have a working prototype of it locally. I'll add the generic functionality in a separate PR.
I've added the hacktoberfest label to this pr (if that's your thing?).
@DaveParr When I enabled the Eventbrite registration section, it wasn't added to the navbar. This PR restores this behavior.