title: EE to manage static content: How would you do this?
body: <p>I'm in a weird place with this new project: I have a client with a working Javascript application and they want to manage the text elements with a CMS. The native JS environment would be leading. </p>
  
  <p>Ideally, EE would manage content and then render to static files in a content directory. I'm not a PHP guy and my experience with EE content has always been dynamic, using it's tags. Now I need to pre-render the content to a file or url, outside the template directory...so I could use some guidance. </p>
  
  <p>Something like this works:</p>
  
  <pre><code>{exp:channel:entries
      channel="content"
      disable="categories|category_fields|member_data|pagination|trackbacks"
      status="Open"
      dynamic="no"
      limit="1"
  }
  
  &lt;?php 
   $File = "./articles/YourFile.html"; 
   $Handle = fopen($File, 'w');
   $Data = "&lt;h1&gt;{title}&lt;/h1&gt;\n&lt;hr /&gt;&lt;p&gt;{base_body}&lt;/p&gt;\n"; 
   fwrite($Handle, $Data); 
   print "Data Written"; 
   fclose($Handle); 
   ?&gt;
  
  {/exp:channel:entries}
  </code></pre>
  
  <p>But I actually have to manually view the page to render content... is there a way around this? Can I use EE as an service? An example on how to render the above content would be helpful..I'm getting my head around services today too.. </p>