CakePHP Medianova CDN Entegrasyonu

CakePHP is an open-source framework, such as Zend, Laravel, and Symfony, developed with MVC (Model-View-Controller) logic and on PHP.

We have explained the CDN integration steps that support the CakePHP 2.4 version and higher versions for you.

Note: We recommend back up your files and database before they integrate
  1. First, create the Zone for account
  2. Add the base URL variables in the ./Config/bootstrap.php config file for define Medianova CDN in bootstrap
    Configure::write('App.imageBaseUrl', '');
    Configure::write('App.cssBaseUrl', '');
    Configure::write('App.jsBaseUrl', '');
  3. Use the HTML helper for image HtmlHelper::image
    <?php echo $this->Html->image('your-logo.png', array('alt' => 'Your Logo')); ?>

    Will Output:

    <img src="" alt="Medianova Logo" />
  4. Use the HTML helper for CSS HtmlHelper::css
    <?php echo $this->Html->css('your-css'); ?>

    Will Output:

    <link rel="stylesheet" type="text/css" href="" />
  5. Use the HTML helper for JavaScript HtmlHelper::script
    <?php echo $this->Html->script('your-js'); ?>

    Will Output:

    <script type="text/javascript" href=""></script>
  6. Check the HTML source code to find out your assets whether (or not) loading from Medianova CDN