• Hiển thị 1-10 của 10 tin nhắn. Mạch tin nhắn
    Đã gửi cách đây 5251 ngày
    avatar

    gomen em. A gui nho it tai lieu nhe. Ben cua anh ko post duoc.

    Đã gửi cách đây 5251 ngày
    avatar

    b. template put the template code to display a list of question in a _list.php fragment and replace the listSuccess.php content by a simple:

    popular questions

    <?php echo include_partial('list', array('question_pager' => $question_pager)) ?>

    Đã gửi cách đây 5251 ngày
    avatar

    3. Refactoring a. Model The question/list action executes code that is closely related to the model, that's why we will move this code to the model. Replace the question/list action by:

    Đã gửi cách đây 5251 ngày
    avatar

    e.Add the routing rule for the subsequent pages open the apps/frontend/config/routing.yml file and add at the top: popular_questions:

     url:   /index/:page 
     param: { module: question, action: list } 
    

    add another routing rule for the login page: login:

     url:   /login 
     param: { module: user, action: login } 
    
    Đã gửi cách đây 5251 ngày
    avatar

    This code takes advantage of the numerous methods of the sfPropelPager object, among which ->haveToPaginate(), which returns true only if the number of results to the request exceeds the page size; ->getPreviousPage(), ->getNextPage() and ->getLastPage(), which have obvious meanings; ->getLinks(), which provides an array of page numbers; and ->getCurrentMaxLink(), which returns the last page number.

    Đã gửi cách đây 5251 ngày
    avatar

    d.Add page navigation There is one more thing to add to this template: The page navigation. append at the end of the template:

    Đã gửi cách đây 5251 ngày
    avatar

    d. Add page navigation There is one more thing to add to this template: The page navigation. append at the end of the template:

    <?php if ($question_pager->haveToPaginate()): ?>

    <?php echo link_to('
    Đã gửi cách đây 5251 ngày
    avatar

    c. Modify the listSuccess.php template In the listSuccess.php template, just replace the line <?php foreach($questions as $question): ?> by <?php foreach($question_pager->getResults() as $question): ?>

    Đã gửi cách đây 5251 ngày
    avatar

    b.Create the loginSuccess.php template In the askeet/apps/frontend/modules/user/templates/ directory, create the following loginSuccess.php template:

    These symfony functions help to automate the writing of form tags. The form_tag() helper opens a form with a default POST behaviour, and points to the action given as argument. The input_tag() helper produces an <input> tag (that's a surprise) by automatically adding an id attribute based on the name given as first argument; the default value is taken from the second argument. Read more in the: http://www.symfony-project.org/book/1_0/10-Forms

    Đã gửi cách đây 5290 ngày
    avatar

    hallo Tako

    tác giả


    Tìm thêm với Google.com :

    NHÀ TÀI TRỢ
Mời bạn chọn bộ gõ Anh Việt
Bạn còn lại 350 ký tự.
X