TAILIEUCHUNG - Tạo mạng xã hội với PHP - part 14

Friends and Relationships addTag( 'previous', '' ); } else { $this-registry-getObject('template')-getPage()- addTag( 'first', "First page" ); $this-registry-getObject('template')-getPage()- addTag( 'previous', "getCurrentPage() - 2 ) . "'Previous page" ); } if( $pagination-isLast() ) { $this-registry-getObject('template')-getPage()- addTag( 'next', '' ); $this-registry-getObject('template')-getPage()- addTag( 'last', '' ); } else { $this-registry-getObject('template')-getPage()- addTag( 'first', "getCurrentPage() . "'Next page" ); $this-registry-getObject('template')-getPage()- addTag( 'previous', "getNumPages() - 1 ) . "'Last page" ); } } } To actually display the results of the lookup to the user, we need a template to form our members' list view. This is essentially a copy of the main template. | Friends and Relationships addTag previous else this- registry- getObject template - getPage - addTag first a href members list First page a this- registry- getObject template - getPage - addTag previous a href members list . pagination- getCurrentPage - 2 . Previous page a if pagination- isLast this- registry- getObject template - getPage - addTag next this- registry- getObject template - getPage - addTag last else this- registry- getObject template - getPage - addTag first a href members list . pagination- getCurrentPage . Next page a this- registry- getObject template - getPage - addTag previous a href members list . pagination- getNumPages - 1 . Last page a To actually display the results of the lookup to the user we need a template to form our members list view. This is essentially a copy of the main template file with a template loop for the members information. This is saved in the views default templates members file div id main div id rightside div div id content h1 DINO SPACE Members List h1 -- START members -- p strong name strong p p Keeper of strong dino_name strong a strong dino_gender dino_breed strong p ----------------------------------- 112 --------------------------------- Download from Chapter 4 hr -- END members -- p Viewing page page_number of num_pages p p first previous next last p div div This then displays our users list which currently only contains me as shown below Paginated users by letter As the site grows but before we have such a large user base we need to consider listing more relevant users we are going to end up with a paginated list which isn t particularly easy to navigate. For example if we have 20 users listed on each page and 100 pages of results if our user wants to quickly jump to users with a surname beginning with P it may take them several attempts. To make this easier we can also provide filtering by alphabetical character so the user can click on P and be taken to a list of users with .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.