第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

我正在嘗試更好地查看我的動態(tài)分頁,但它不起作用

我正在嘗試更好地查看我的動態(tài)分頁,但它不起作用

阿晨1998 2022-06-11 09:28:58
我有產(chǎn)品的動態(tài)分頁。我的分頁工作正常,只是我想更好地查看我的分頁??捶ǎ?nbsp;<div  style='margin-top: 10px;' class="page-link" align="center">   <?= $pagination; ?>  </div>控制器:function category($rowno=0)       {        $rootCatId  =   $this->input->get('rootCatId');        $subCatId   =   $this->input->get('subCatId');        $rowno      =   $this->input->get('per_page');        $data=array();        if($rootCatId > 0 && $subCatId== 0){            $rowperpage = 12;            if($rowno != 0){              $rowno = ($rowno-1) * $rowperpage;            }            $search_text = "";            if($this->input->post('submit') != NULL ){              $search_text = $this->input->post('search');              $this->session->set_userdata(array("search"=>$search_text));            }else{              if($this->session->userdata('search_product') != NULL){                $search_text = $this->session->userdata('search_product');              }            }            $rowperpage = 12;            if($rowno != 0){              $rowno = ($rowno-1) * $rowperpage;            }            $allcount = $this->product->getrecordCount($search_text);            $users_record = $this->product->fetchAllProductByMainCat($rootCatId,$rowno,$rowperpage,$search_text);            $config['base_url']             = base_url().'category';            $config['uri_segment']          = 3;            $config['reuse_query_string']   = TRUE;            $config['enable_query_strings'] = TRUE;            $config['page_query_string']    = TRUE;            $config['use_page_numbers']     = TRUE;            $config['total_rows']           = $allcount;            $config['per_page']             = $rowperpage;            $config['cur_tag_open'] = '&nbsp;<a class="page-link">';            $config['cur_tag_close'] = '</a>';            $config['next_link'] = 'Next';            $config['prev_link'] = 'Previous';我想顯示分頁看起來像下圖。我$config為分頁設置了所有必要的配置。我不知道我的代碼哪里錯了
查看完整描述

2 回答

?
繁花如伊

TA貢獻2012條經(jīng)驗 獲得超12個贊

您做得很好,但沒有在自定義分頁中添加 html 標簽。只需在當前代碼之間添加一些行。


function category($rowno=0)

       {

        $rootCatId  =   $this->input->get('rootCatId');

        $subCatId   =   $this->input->get('subCatId');

        $rowno      =   $this->input->get('per_page');

        $data=array();

        if($rootCatId > 0 && $subCatId== 0){

            $rowperpage = 12;

            if($rowno != 0){

              $rowno = ($rowno-1) * $rowperpage;

            }

            $search_text = "";

            if($this->input->post('submit') != NULL ){

              $search_text = $this->input->post('search');

              $this->session->set_userdata(array("search"=>$search_text));

            }else{

              if($this->session->userdata('search_product') != NULL){

                $search_text = $this->session->userdata('search_product');

              }

            }

            $rowperpage = 12;

            if($rowno != 0){

              $rowno = ($rowno-1) * $rowperpage;

            }

            $allcount = $this->product->getrecordCount($search_text);

            $users_record = $this->product->fetchAllProductByMainCat($rootCatId,$rowno,$rowperpage,$search_text);

            $config['base_url']             = base_url().'category';

            $config['uri_segment']          = 3;

            $config['reuse_query_string']   = TRUE;

            $config['enable_query_strings'] = TRUE;

            $config['page_query_string']    = TRUE;

            $config['use_page_numbers']     = TRUE;

            $config['total_rows']           = $allcount;

            $config['per_page']             = $rowperpage;

            $config['cur_tag_open'] = '&nbsp;<a class="page-link">';

            $config['cur_tag_close'] = '</a>';

            $config['next_link'] = 'Next';

            $config['prev_link'] = 'Previous';


            //This segment is used for the design (looks) start here

            $config['full_tag_open'] = '<ul class="pagination">';

            $config['full_tag_close'] = '</ul>';

            $config['num_tag_open'] = '<li class="page-item">';

            $config['num_tag_close'] = '</li>';

            $config['cur_tag_open'] = '<li class="page-item active"><a class="page-link" href="#">';

            $config['cur_tag_close'] = '</a></li>';

            $config['next_tag_open'] = '<li class="page-item">';

            $config['next_tagl_close'] = '</a></li>';

            $config['prev_tag_open'] = '<li class="page-item">';

            $config['prev_tagl_close'] = '</li>';

            $config['first_tag_open'] = '<li class="page-item disabled">';

            $config['first_tagl_close'] = '</li>';

            $config['last_tag_open'] = '<li class="page-item">';

            $config['last_tagl_close'] = '</a></li>';

            $config['attributes'] = array('class' => 'page-link');

            $this->pagination->initialize($config);

             //This segment is used for the design (looks) end here

            // Initialize

            $this->pagination->initialize($config);

            $data['pagination'] = $this->pagination->create_links();

            $data['viewAll']    = $users_record;

            $data['row']        = $rowno;

            $data['search']     = $search_text;


         }elseif($rootCatId > 0 && $subCatId !==0 && $subCatId > 0){


                $rowperpage = 12;

                if($rowno != 0){

                  $rowno = ($rowno-1) * $rowperpage;

                }


                $search_text = "";

                if($this->input->post('submit') != NULL ){

                  $search_text = $this->input->post('search');

                  $this->session->set_userdata(array("search"=>$search_text));

                }else{

                  if($this->session->userdata('search_product') != NULL){

                    $search_text = $this->session->userdata('search_product');

                  }

                }

                $allcount = $this->product->getrecordCount($search_text);

                $users_record = $this->product->fetchProductByCat($rootCatId,$subCatId,$rowno,$rowperpage,$search_text);

                $config['base_url'] = base_url().'category';

                $config['reuse_query_string'] = TRUE;

                $config['enable_query_strings']=TRUE;

                $config['page_query_string'] = TRUE;

                $config['use_page_numbers'] = TRUE;

                $config['total_rows'] = $allcount;

                $config['per_page'] = $rowperpage;

                $config['cur_tag_open'] = '&nbsp;<a class="page-link">';

                $config['cur_tag_close'] = '</a>';

                $config['next_link'] = 'Next';

                $config['prev_link'] = 'Previous';


                //This segment is used for the design (looks) start here

                $config['full_tag_open'] = '<ul class="pagination">';

                $config['full_tag_close'] = '</ul>';

                $config['num_tag_open'] = '<li class="page-item">';

                $config['num_tag_close'] = '</li>';

                $config['cur_tag_open'] = '<li class="page-item active"><a class="page-link" href="#">';

                $config['cur_tag_close'] = '</a></li>';

                $config['next_tag_open'] = '<li class="page-item">';

                $config['next_tagl_close'] = '</a></li>';

                $config['prev_tag_open'] = '<li class="page-item">';

                $config['prev_tagl_close'] = '</li>';

                $config['first_tag_open'] = '<li class="page-item disabled">';

                $config['first_tagl_close'] = '</li>';

                $config['last_tag_open'] = '<li class="page-item">';

                $config['last_tagl_close'] = '</a></li>';

                $config['attributes'] = array('class' => 'page-link');

                $this->pagination->initialize($config);

                 //This segment is used for the design (looks) end here


                $data['pagination'] = $this->pagination->create_links();

                $data['viewAll'] = $users_record;

                $data['row'] = $rowno;

                $data['search'] = $search_text;

          }

                $data['get_website_content'] = $this->pg_model->get_website_content();

                $data['BannerImage']         = $this->product->fetchBannerImage($rootCatId);

                $data['MainName']            = $this->product->NameByMainCat($rootCatId);

                $data['SubName']             = $this->product->NameBySubCat($subCatId);


                $data['product_list_commercial']    = $this->pg_model->product_list_commercial();

                $this->load->view('template/header',$data);

                $this->load->view('category');

                $this->load->view('template/footer');

    }

在此之后,您可以根據(jù)添加的類屬性添加自定義 css,包括在 html 上。


查看完整回答
反對 回復 2022-06-11
?
慕標琳琳

TA貢獻1830條經(jīng)驗 獲得超9個贊

如果您使用的是引導程序,那么您可以將以下代碼與其他配置值一起使用,


/* Pagination buttion style start  */

    $config['full_tag_open'] = "<ul class='pagination'>";

    $config['full_tag_close'] = '</ul>';

    $config['num_tag_open'] = '<li>';

    $config['num_tag_close'] = '</li>';

    $config['cur_tag_open'] = '<li class="active"><a href="#">';

    $config['cur_tag_close'] = '</a></li>';

    $config['prev_tag_open'] = '<li>';

    $config['prev_tag_close'] = '</li>';

    $config['first_tag_open'] = '<li>';

    $config['first_tag_close'] = '</li>';

    $config['last_tag_open'] = '<li>';

    $config['last_tag_close'] = '</li>';        

    $config['prev_link'] = '<i class="fa fa-chevron-left"></i>';

    $config['prev_tag_open'] = '<li>';

    $config['prev_tag_close'] = '</li>';        

    $config['next_link'] = '<i class="fa fa-chevron-right"></i>';

    $config['next_tag_open'] = '<li>';

    $config['next_tag_close'] = '</li>';

    /* Pagination buttion style end */


查看完整回答
反對 回復 2022-06-11
  • 2 回答
  • 0 關注
  • 131 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號