Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

sjelfull/Craft-Faker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Craft Faker plugin

Allows you to use Faker to output random fake data in your templates. It can go hand in hand with for example Viget's Front-end Parts Kits

Usage

Here's an example of some faking:

{% set faker = craft.faker.fake %}
<ul>
{% for i in 1..10 %}
    <li>{{ faker.name }}, living at: {{ faker.address }}. Profile picture: {{ faker.imageUrl(640, 450, 'people') }}</li>
{% endfor %}
</ul>

Localization

To use another locale, like French:

{% set faker = craft.faker.locale('fr_FR').fake() %}

For a list of supported locales, check out the Faker docs