This intial release contains the following functionality
- Layouts / pages and a navigation that automatically shows where you are
- helper for random names / emails / phonenumbers
- helper for random pick of a list
- lists with random, but persisting data
https://github.com/RolandStuder/jeizinen-meteor/releases/tag/v0.3
Layouts / Pages and a navigation that automatically shows where you are
localhost:3000/layoutName/parentNavigation.yourTemplate
# layoutName - will render the layout with this name and render the page at {{> renderPage }}
# parentNavigation - links pointing to parentNavigation will get class 'active'
# yourTemplate - the template with the name 'yourTemplate' will by displayed
Random data like names and phonenumbers
{{random 'name'}}
Will return a random combinations of a first name and a family name. Other options are:
{{random 'firstName'}}
{{random 'familyName'}}
{{random 'phoneNumber'}}
{{random 'email'}}
more to come⦠(dates, birthdays)
Random pick of a list defined by yourself
{{pick 'The Alliance, The Rebels, Neutral'}}
Will return one of the comma-separated options.
Lists of objects with random data
You can create sets of datas, called collections, and can use them in your views without defining them beforehand. For example you can create a list of people like this:
{{#collection name='people' create='10'}}
{{field 'name'}}
{{/collection}}
This will output a list of 10 names. This data is saved and will not change, if you switch between pages. However if you reload a page, the collections are reset.
If you use on the options that work for the random helper, it automatically returns a random value. More possibilities are available:
{{#collection name='people' create='10'}}
{{field 'name' random="firstName"}} // will give you a random first name
{{field 'category' pick="a,b,c"}} // will return a random pick
{{/collection}}