Ecstore new App App

Source: Internet
Author: User

1. Create a new app with commands

1 //   -----   window Platform   -----2  3 Run "site root/app/base/cmd.bat" directly  4 after the command line appears, enter           dev:new app MyApp5  6//   -----   Linux Platform   ----- 7  8 terminal access to "site root/app/base" 9 run                      cmd dev:new app MyApp

2. After running, the command-line tool creates the App/myapp directory and generates the Services.xml and app.xml files.

3. Next we create a few basic necessary folders and files.

4.desktop.xml is the background menu "display" file. So we first modify the Desktop.xml, the configuration content is as follows:

1 <Desktop>2     <Permissions>3         <PermissionID= "MyApp"Workground= "Myapp.wrokground.test"Display= ' true '>My app</Permission>4     </Permissions>5  6     <Workgroundname= "Test App"ID= "Myapp.wrokground.test"Controller= "Admin_test"Action= "Index"Order= " the">7         <Menugroupname= "Test Management"> 8             <MenuController= ' Admin_test 'Action= ' Index 'Permission= ' MyApp 'Display= ' true 'Order= ' Ten '>Test List</Menu>9             <MenuController= ' Admin_test 'Action= ' Add 'Permission= ' MyApp 'Display= ' false 'Order= ' a '>Add test</Menu> Ten         </Menugroup>  One     </Workground>  A </Desktop>

Desktop.xml label of course more than that, in accordance with the rules of grammar, according to their own needs can be arbitrarily increased or decreased tags.

5.app basically have been built, below we test.

Create the site root/app/myapp/controller/admin/test.php content as follows:

1<?PHP2 classMyapp_ctl_admin_testextendsdesktop_controller{3  4      Public function__construct ($app){5Parent::__construct ($app);6     }7     functionindex () {8         $this->page (' admin/index.html ');9         //Some children's shoes here are the direct echo output. Like the following. This causes the left navigation bar to not appear.Ten //echo "Test"; One     } A}

Create the site root/app/myapp/view/admin/index.html content as follows:

Test test test

6. Install the App

1 //    -----   window Platform   -----2  3 run the site root/app/base/cmd.bat4 directly After the command line appears, enter           install MyApp5  6//   -----   Linux Platform   -----7  8 terminal go to "site root/app/base"9 run                      cmd install MyApp

7. Next visit your own site and you will see the following scene. The new app has been built for success.

Ecstore new App App

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.