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

Ability to control "Become a <level> sponsor" links #93

Closed
WhatsChrisDoing opened this issue Apr 11, 2016 · 4 comments
Closed

Ability to control "Become a <level> sponsor" links #93

WhatsChrisDoing opened this issue Apr 11, 2016 · 4 comments

Comments

@WhatsChrisDoing
Copy link
Contributor

Extend the sponsor_levels array to include the number of sponsor slots at each level so that the "Become a sponsor" can be automatically excluded for levels that are full.

@bridgetkromhout
Copy link
Collaborator

Thanks for working on this, @yvovandoorn. I think this might be best configured like this:

sponsor_levels:
- id: platinum
label: Platinum
max: 3 # since Minneapolis already has 3, this would automatically remove the "become a..."
- id: gold
label: Gold
max: 12
- id: silver
label: Silver
number: # left blank which makes the number unlimited

And here's an optional but related possibility:

- id: host
  label: Host
  number: 1 # If one host sponsor is allowed, change "Host Sponsors" to instead display as "Host Sponsor".

Your option for turning off all "become a sponsor" messages on a city-wide basis is fine, but I suspect that the main uses of that would be "before the prospectus is done" and "when the conference is almost happening". So, an event-wide override like this might work:

sponsors_accepted: "yes"

I think it's fine for it to be a required field and could default to "no". Then people could turn it on when they're ready.

@bridgetkromhout
Copy link
Collaborator

Moving the discussion from #294 (comment), @yvovandoorn says:

The biggest challenge I've been having with Hugo (and thus my limits) is how the logic around how to compare sponsor.level vs sponsor_levels.max works.

Given this is my 4th day with Hugo (or Go in general) so far I've come this far:

      {{ else if ge var .max }}
         <div class = "sponsor-cta">
          <br>
       </div>

My struggles:

Is how to properly add up the levels set under sponsors.level against sponsor_levels.max.

Example

I have 4 sponsors:

 sponsors:
  - id: solvinity
    level: gold
  - id: stackstate
    level: gold
  - id: thoughtworks-products
    level: gold
 sponsor_levels:
  - id: gold
    label: Gold
    max: 2

How do I count up the id 'gold' being used 3x under sponsors to fire off against (greater than or equal to) under sponsor_levels.max:2. Feels like there is a loop in involved and the sysadmin in me to use unix commands to determine the comparison. Obviously not appropriate here.

@bridgetkromhout
Copy link
Collaborator

@pmoosh and @ksatirli are also probably interested in this.

@bridgetkromhout
Copy link
Collaborator

Solved by @jyee in #737. Thanks, Jason!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants