Results 1 to 3 of 3

Thread: Using absolute Path to include Controller (.js File)

  1. #1
    Sencha Premium Member mik3e's Avatar
    Join Date
    Jan 2012
    Location
    Vienna / Austria
    Posts
    81
    Vote Rating
    1
      0  

    Default Answered: Using absolute Path to include Controller (.js File)

    Hi there,

    I'm using ExtJS together with Zend Framework. In the framework Im using a route where the requested language is included (eg. http://www.domain.com/en/content).

    For that reason I have to include all my Javascripts and CSS with an absolute path, otherwise (cause of the routing rules), the client would look in /en, /de etc. for the files and cant find them.

    That was not a big problem at all, till I started to integrate ExtJS in the project.

    The problem:
    How am I able to definde, that all classes (especially controller) should be loaded via an absolute path!?

    Here is my example from the ExtJS Tutorial - the bootstrap file (app.js):
    HTML Code:
    /**
     * ExtJS Bootstrap
     */
    Ext.application({
        name: 'LT',
    
        appFolder: 'app',
        
        controllers: [
            'Users'
        ],
    This results in the following client side output:
    HTML Code:
    <script type="text/javascript" src="en/app/controller/Users.js?_dc=1327131001512"></script>
    But what I need that it works is the following reference:
    HTML Code:
    <script type="text/javascript" src="http://www.domain.com/app/controller/Users.js?_dc=1327131001512"></script>
    So is there a chance to declare a "Root URL" in the bootstrap and that ExtJS should use absolute pathes for loading external files?

    Thank you in advance for your help guys,
    Cheers,
    Mike

  2. Check out the appFolder config in Ext.application. You can set it to 'http://www.domain.com/app'

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Check out the appFolder config in Ext.application. You can set it to 'http://www.domain.com/app'
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha Premium Member mik3e's Avatar
    Join Date
    Jan 2012
    Location
    Vienna / Austria
    Posts
    81
    Vote Rating
    1
      0  

    Default Thanks

    Hi,

    Thanks - thats it!

    Cheers,
    Mike

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •