Symfony

Discussion in 'PHP' started by jjrosales, Mar 1, 2010.

  1. #1
    I am developing a symfony and aplicaion in ExtJs as Framwork for presentation, but I have a problem pet and use the front controller development while the js loads me but when I use the production rate controller of the cagrga I code of the js libraries of the ext js neither of my sight.

    Thanks in advance.
     
    jjrosales, Mar 1, 2010 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Not really sure what you're asking but you should be able to include external or external javascript using the view.yml file.
     
    jestep, Mar 1, 2010 IP
  3. jjrosales

    jjrosales Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks i try put in yml file the configuration but work good in mode dev not this in mode prod i take one soluction for load dimaccli this files look in the controller fron of prd i put this code:

    <?php
    require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');
    $configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'prod', false);

    $base = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http');
    $base .= '://' . $_SERVER['HTTP_HOST'];
    sfConfig::set('app_base_link',$base.$_SERVER['SCRIPT_NAME']);

    $base .= str_replace('/' . basename($_SERVER['SCRIPT_NAME']),'' , $_SERVER['SCRIPT_NAME']);
    sfConfig::set('app_base_url',$base);

    sfContext::createInstance($configuration)->dispatch();

    /---------------------------------------------------------------------
    in the layout load libraris ...


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <script type="text/javascript" src="<?php echo sfConfig::get('app_base_url') ?>/css/ext-all.css"></script>
    <script type="text/javascript" src="<?php echo sfConfig::get('app_base_url') ?>/js/extjs/ext-base.js"></script>
    <script type="text/javascript" src="<?php echo sfConfig::get('app_base_url') ?>/js/extjs/ext-all.js"></script>
    <?php include_http_metas()?>
    <?php include_metas() ?>
    <?php include_title() ?>
    <link rel="shortcut icon" href="/favicon.ico" />
    </head>
    <body>
    <?php echo $sf_content ?>
    </body>
    </html>


    and workkkk, lol tel me wat yoy thinks about this?
     
    jjrosales, Mar 2, 2010 IP