getchopchop / chopchop

Front end user interface primer toolkit for the pro's
https://getchopchop.github.io
MIT License
31 stars 7 forks source link

Investigate idea of passing data into a pattern #123

Open daveredfern opened 8 years ago

daveredfern commented 8 years ago

It would be great to be able to pass data into a pattern. So we could have something like:

<?php
$data = array(
'text' => 'We have a special offer today!'
);
printPattern('component/alert/base', $data);
?>

Not entirely sure how this would work but would save lots of copying and pasting.