Comment créer pages html avec template + données csv
Posté : 12 juin 2014, 18:39
Bonjour,
J'ai créé un template html qui ressemble en gros à cela:
mon fichier csv ressemble à cela :
productname , productlogo , productimage , productoldprice , productprice , model , productdescription
aaaaaaaaaaa , bbbbbbbbbbb , cccccccccccc , ddddddddddddddd , eeeeeeeeeeee , fffff , gggggggggggggggggg
aaaaaaaaaaa , bbbbbbbbbbb , cccccccccccc , ddddddddddddddd , eeeeeeeeeeee , fffff , gggggggggggggggggg
Donc je cherche à utiliser le fichier csv comme source de données ainsi que la page template
pour obtenir un résultat comme ceci:
productname1.html
productname2.html
productname3.html etc..
merci pour vos retours
J'ai créé un template html qui ressemble en gros à cela:
Code : Tout sélectionner
<html>
<head>
<title>{productname} Home Page</title>
<style></style>
</head>
<body>
<img style="width: 100%; height: 100%" src='data:image/png;base64,{productlogo}'/>
<img style="width: 100%; height: 100%" src='data:image/png;base64,{productimage}'/>
<strong>{productname}</strong>
<del>
<font color=#FF0000>
{productoldprice}
</font>
</del>
<strong>{productprice}</strong>
<input type=hidden name=model id=model value='{model}'>
<p>{productdescription} </p>
</body>
</html> mon fichier csv ressemble à cela :
productname , productlogo , productimage , productoldprice , productprice , model , productdescription
aaaaaaaaaaa , bbbbbbbbbbb , cccccccccccc , ddddddddddddddd , eeeeeeeeeeee , fffff , gggggggggggggggggg
aaaaaaaaaaa , bbbbbbbbbbb , cccccccccccc , ddddddddddddddd , eeeeeeeeeeee , fffff , gggggggggggggggggg
Donc je cherche à utiliser le fichier csv comme source de données ainsi que la page template
pour obtenir un résultat comme ceci:
productname1.html
productname2.html
productname3.html etc..
merci pour vos retours