• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Double view page render

#3
I use Elixir without any problems in CodeIgniter. I believe it's your best shot.

You'll need this tiny helper, to use Elixir with versioning capability:
PHP Code:
/**
 * Elixir asset helper
 *
 * @param string $file File name
 * @return string
 *
 * @throws \InvalidArgumentException
 */
function elixir($file)
{
 
   static $manifest NULL;

 
   if (is_null($manifest))
 
   {
 
       $manifest json_decode(file_get_contents(FCPATH '/build/rev-manifest.json'), TRUE);
 
   }

 
   if (isset($manifest[$file]))
 
   {
 
       return '/build/' $manifest[$file];
 
   }

 
   throw new InvalidArgumentException("File {$file} not defined in asset manifest.");

This helper assume that, you use default paths defined in Elixir.
Reply


Messages In This Thread
Double view page render - by kavvson - 03-25-2016, 07:01 PM
RE: Double view page render - by kilishan - 03-25-2016, 08:21 PM
RE: Double view page render - by michalsn - 03-25-2016, 11:46 PM
RE: Double view page render - by kavvson - 03-26-2016, 07:11 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.