Development

Changeset 7425

You must first sign up to be able to contribute.

Changeset 7425

Show
Ignore:
Timestamp:
02/08/08 23:36:42 (10 months ago)
Author:
dwhittle
Message:

dwhittle: fixed grammar in my first project, closes #2788

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/branches/1.0/tutorial/my-first-project.txt

    r7362 r7425  
    8181configuration in the [configuration chapter](http://www.symfony-project.org/book/1_0/05-Configuring-Symfony). 
    8282 
    83 This schema describes the structure of two the tables needed for the weblog. `Post` and `Comment` are the names of the 
     83This schema describes the structure of two of the tables needed for the weblog. `Post` and `Comment` are the names of the 
    8484related classes to be generated. Save the file, open a command line, browse to the `sf_sandbox/` directory and type: 
    8585 
     
    148148> 
    149149>     $ php symfony clear-cache 
    150 >      
     150> 
    151151>     http://localhost/sf_sandbox/web/index.php/ 
    152152 
     
    171171        <h1><?php echo link_to('My first symfony project', '@homepage') ?></h1> 
    172172      </div> 
    173        
     173 
    174174      <div id="content" style="clear:right"> 
    175175        <?php echo $sf_data->getRaw('sf_content') ?> 
     
    299299    [php] 
    300300    <?php echo link_to('Add a comment', 'comment/create?post_id='.$post->getId()) ?> 
    301      
     301 
    302302The `link_to()` helper creates a hyperlink pointing to the `create` action of the `comment` module, so you can add a 
    303303comment directly from the post details page. Next, open the `modules/comment/templates/editSuccess.php` and replace the 
     
    311311    )) ?></td> 
    312312    </tr> 
    313      
     313 
    314314By: 
    315315 
    316316    [php] 
    317317    <?php if ($sf_params->has('post_id')): ?> 
    318       <?php echo input_hidden_tag('post_id',$sf_params->get('post_id')) ?>  
     318      <?php echo input_hidden_tag('post_id',$sf_params->get('post_id')) ?> 
    319319    <?php else: ?> 
    320320      <tr> 
     
    323323      </tr> 
    324324    <?php endif; ?> 
    325      
     325 
    326326The form in the `comment/create` page points to a `comment/update` action, which redirects to `comment/show` when 
    327327submitted (this is the default behaviour in generated CRUDs). For the weblog, that means that after adding a comment to a 
     
    410410 
    411411    [php] 
    412     <?php if ($sf_request->hasErrors()): ?>   
     412    <?php if ($sf_request->hasErrors()): ?> 
    413413      <div id="errors" style="padding:10px;"> 
    414414        Please correct the following errors and resubmit: 
     
    539539    $ php symfony propel-init-admin backend post Post 
    540540    $ php symfony propel-init-admin backend comment Comment 
    541      
     541 
    542542This time, we use the [admin generator](http://www.symfony-project.org/book/1_0/14-Generators). It offers much more 
    543543features and customization than the very basic CRUD generator. 
     
    559559 
    560560    http://localhost/sf_sandbox/web/backend_dev.php/post 
    561      
     561 
    562562![basic generated admin](/images/tutorials/first_basic_admin.gif) 
    563563 
     
    676676      .actions: 
    677677        login_module:           security 
    678         login_action:           index     
     678        login_action:           index 
    679679 
    680680At that point, if you try to access the Posts management, you will have to enter a login and a password: 
  • doc/branches/1.1/tutorial/my-first-project.txt

    r7361 r7425  
    8585[configuration chapter](http://www.symfony-project.org/book/1_1/05-Configuring-Symfony). 
    8686 
    87 This schema describes the structure of two the tables needed for the blog. 
     87This schema describes the structure of two of the tables needed for the blog. 
    8888`Post` and `Comment` are the names of the related classes to be generated. 
    8989Save the file, open a command line, browse to the `sf_sandbox/` directory and type: 
     
    191191> 
    192192>     $ php symfony cache:clear 
    193 >      
     193> 
    194194>     http://localhost/sf_sandbox/web/index.php/ 
    195195 
     
    215215        <h1><?php echo link_to('My first symfony project', '@homepage') ?></h1> 
    216216      </div> 
    217        
     217 
    218218      <div id="content" style="clear:right"> 
    219219        <?php echo $sf_data->getRaw('sf_content') ?> 
     
    355355    [php] 
    356356    <?php echo link_to('Add a comment', 'comment/create?post_id='.$post->getId()) ?> 
    357      
     357 
    358358The `link_to()` helper creates a hyperlink pointing to the `create` action of 
    359359the `comment` module, so you can add a comment directly from the post details page. 
     
    368368    )) ?></td> 
    369369    </tr> 
    370      
     370 
    371371By: 
    372372 
    373373    [php] 
    374374    <?php if ($sf_params->has('post_id')): ?> 
    375       <?php echo input_hidden_tag('post_id',$sf_params->get('post_id')) ?>  
     375      <?php echo input_hidden_tag('post_id',$sf_params->get('post_id')) ?> 
    376376    <?php else: ?> 
    377377      <tr> 
     
    380380      </tr> 
    381381    <?php endif; ?> 
    382      
     382 
    383383The form in the `comment/create` page points to a `comment/update` action, which 
    384384redirects to `comment/show` when submitted (this is the default behaviour in generated CRUDs). 
     
    476476 
    477477    [php] 
    478     <?php if ($sf_request->hasErrors()): ?>   
     478    <?php if ($sf_request->hasErrors()): ?> 
    479479      <div id="errors" style="padding:10px;"> 
    480480        Please correct the following errors and resubmit: 
     
    629629 
    630630    http://localhost/sf_sandbox/web/backend_dev.php/post 
    631      
     631 
    632632![basic generated admin](/images/tutorials/first_basic_admin.gif) 
    633633 
     
    777777 
    778778See, the application is fast and runs smoothly. Pretty darn cool, isn't it? 
    779 Feel free to explore the code, add new modules, and change the design of pages.  
     779Feel free to explore the code, add new modules, and change the design of pages. 
    780780 
    781781And don't forget to mention your working symfony applications in the