1. #1
    Sencha Premium Member mik3e's Avatar
    Join Date
    Jan 2012
    Location
    Vienna / Austria
    Posts
    81
    Vote Rating
    1
    mik3e is on a distinguished road

      0  

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

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


    Hi there,

    I'm using ExtJS together with Zend Framework. In the framework I´m 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 can´t 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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,024
    Answers
    3492
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Check out the appFolder config in Ext.application. You can set it to 'http://www.domain.com/app'
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

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

      0  

    Default Thanks

    Thanks


    Hi,

    Thanks - that´s it!

    Cheers,
    Mike

Thread Participants: 1

Tags for this Thread