Page list with sort by attributes like a form with search button
Permalink
Hello everyone,
I'd like to build a page list with sort by attributes with form with select inputs, and search button.
When i click search page list show me only page with selected attributes, and when don't click show me all pages...
Could you help me, and write any ideas?
I'd like to build a page list with sort by attributes with form with select inputs, and search button.
When i click search page list show me only page with selected attributes, and when don't click show me all pages...
Could you help me, and write any ideas?
Sorry for my stupid question but in my controller.php in page_list folder is only
" defined('C5_EXECUTE') or die("Access Denied.");
class PageListBlockController extends Concrete5_Controller_Block_PageList {
}
"
Where can i find it?
" defined('C5_EXECUTE') or die("Access Denied.");
class PageListBlockController extends Concrete5_Controller_Block_PageList {
}
"
Where can i find it?
Ok i found it :)
Hi again,
i have another question, because the option in standard page list " the newewst on the top " doesn't work and when I create new page it doesn't show the newest article but random.
Maybe is a fix on this problem?
Thanks for reply...
i have another question, because the option in standard page list " the newewst on the top " doesn't work and when I create new page it doesn't show the newest article but random.
Maybe is a fix on this problem?
Thanks for reply...
Add this:
$pagelist->sortByPublicDateDescending();
I tried this but C5 sort by the last date to new date of public...
$pagelist->sort('cID', 'DESC');
In controller I write like that and it works:
<code>
$cArray = array();
switch($row['orderBy']) {
case 'display_asc':
$pl->sortByDisplayOrder();
break;
case 'display_desc':
$pl->sortByDisplayOrderDescending();
break;
case 'chrono_asc':
//$pl->sortByPublicDate();
$pl->sortByPublicDateDescending();
break;
case 'alpha_asc':
$pl->sortByName();
break;
case 'alpha_desc':
$pl->sortByNameDescending();
break;
default:
$pl->sortByPublicDateDescending();
break;
}
</code>
<code>
$cArray = array();
switch($row['orderBy']) {
case 'display_asc':
$pl->sortByDisplayOrder();
break;
case 'display_desc':
$pl->sortByDisplayOrderDescending();
break;
case 'chrono_asc':
//$pl->sortByPublicDate();
$pl->sortByPublicDateDescending();
break;
case 'alpha_asc':
$pl->sortByName();
break;
case 'alpha_desc':
$pl->sortByNameDescending();
break;
default:
$pl->sortByPublicDateDescending();
break;
}
</code>
There are several page list addons in the marketplace that provide the functionality you describe.
Yes i know, but i can't buy form marketplace, it'll be a dedicate block and my boss said " Write it, it's simple ;) "
Sorry Rony I can't pay for this because my boss said you must create this, it will use in feature.
So I need help, but I must write myself...
So I need help, but I must write myself...
If you need any professional help, then I'll be able to make one for you with a very reasonable price.
Rony