Skip to content

Instantly share code, notes, and snippets.

@dgellow
Created February 5, 2013 12:08
Show Gist options
  • Save dgellow/4714099 to your computer and use it in GitHub Desktop.
Save dgellow/4714099 to your computer and use it in GitHub Desktop.
Template for RSS feed - Module 151
<?php
/**
* Created by JetBrains PhpStorm.
* User: dainii
* Date: 31/01/13
* Time: 15:36
* To change this template use File | Settings | File Templates.
*/
?>
<!-- Partie commune du flux RSS -->
<title><?php print($title) ?></title>
<link><?php print($site) ?></link>
<description><?php print($description) ?></description>
<?php foreach ($articles as $a) { ?>
<item>
<title><?php print($a->getName()); ?></title>
<link><?php print($site) ?>/article.php?id=<?php print($a->getId()); ?></link>
<description>
<![CDATA[
<img src="../<?php print($a->getImage()); ?>" />
<p>Prix: <?php print($a->getPrice()); ?></p>
]]>
</description>
<pubDate><?php print(date("D, d M Y H:i:s")); ?></pubDate>
</item>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment