This repository was archived by the owner on Jul 21, 2019. It is now read-only.
Feature: Add shortcode for tito#685
Merged
mattstratton merged 1 commit intodevopsdays:masterfrom Mar 5, 2019
Merged
Conversation
I want to be able to add a shortcode for tito and add specific named params in order to display the tito widget on a page I wish. I also want to allow use of releases and discount-codes The current naming convention is using underscores so lets do that! We'll also move to using external css and js, rather than keep them locally we don't want to add extra work always updating these. Signed-off-by: Chris Mills <me@christophermills.co.uk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We're using tito now in London (https://ti.to/) and I thought it might be helpful to include a shortcode so others don't have to go through embedding the widget code directly into their registration pages.
I'm not the biggest fan on requesting external resources so I don't mind dropping the CSS and JS into the static files if needed. (Please let me know 👍 )
In order to use this you enter
{{< tito_widget event="devopsdays-london/2019" >}}for example on your page. If you want to only show a particular ticket then you can do something like{{< tito_widget event="devopsdays-london/2019" releases="fiaurhghf2k">}}. Similarly if you wanted to apply a discount to the widget you can use thediscount-code="examplediscount"param.This change is