Tags » Pagination

Chapter 9 - Updating, showing and deleting users

Chapter 9 completes the REST actions for User by adding edit, update, index and destroy actions, extending the authorisation security model to these sections and to introduce a privileged administrative class. 1,667 more words

Ruby

[Tutorial Yii] Contoh Pengaturan CGridView

Model

public function search()
 {
 // @todo Please modify the following code to remove attributes that should not be searched.
 $criteria=new CDbCriteria;
 $criteria->compare('id',$this->id);
 $criteria->compare('username',$this->username,true);
 $criteria->compare('password',$this->password,true);
 $criteria->compare('aktivasi',$this->aktivasi,true);
 $criteria->compare('email',$this->email,true);
return new CActiveDataProvider($this, array(
    'criteria'=>$criteria,
    'pagination' => array(
       //'currentPage' => Yii::app()->user->getState('Registrasi_page', 0),
       'pageSize'=>10,
     ),
     'sort'=>array(
        'defaultOrder'=>'create_at DESC',
     ),
 ));
 } 323 more words
Yii Tips

Join the No OFFSET Movement!

Markus Winand from Use The Index, Luke! did it again. He started an exciting battle against one the biggest flaws in the SQL language:

We’ve blogged about this before… 138 more words

Sql

Code to Display Subpages Content in Parent Page With Pagination

<?php
$ids = array();
$pages = get_pages("child_of=".$post->ID);
if ($pages) {
foreach ($pages as $page) {
$ids[] = $page->ID;
}
}
$paged = (get_query_var("paged")) ? get_query_var("paged") : 1; 107 more words
Sanjay Triumph

How to change wordpress odd pagination in numeric pagination

function medas_numeric_posts_nav() {

if( is_singular() )
return;

global $wp_query;

/** Stop execution if there’s only 1 page */
if( $wp_query->max_num_pages <= 1 )
return;

$paged = get_query_var( ‘paged’ ) ? 306 more words

Wordpress

Perennial Favorites: Features for Longform Writers

We often think that our attention spans have grown shorter with the onslaught of digital media, but in fact longform writing — on WordPress.com and beyond — is… 839 more words

General Advice &amp; Pro Tips