Archives block

Permalink
Or a more powerful page list block where you can set paging, do sorting, filtering of pages (ie by date, author, other custom fields).

Actually Im trying to do it but still havent explored structure of Concrete5 and not a PHP expert. Im looking for something like this:

http://www.itgroup.com.ph/archives.php?cat=1...

jpabellon
 
jpabellon replied on at Permalink Reply
jpabellon
Link does not work anymore as I updated our site to use Concrete5. Still if anyone can share code how to do this. Another way probably is to call the pages or collections via a dataabase query and do the view myself.
Remo replied on at Permalink Reply
Remo
I'm actually working on that but I have to prepare for my exams right now and this is not going to be finished in January.

But I've got pretty much the same needs as you...
jpabellon replied on at Permalink Reply
jpabellon
I didnt have time to create a block, but solved it by basically just coming up with a view / presentation for the block. Used a jquery plugin called dataTables:

http://plugins.jquery.com/project/DataTables...

Its not elegant but it works...

EXAMPLE:
http://www.itgroup.com.ph/corporate/updates/corporate_news/...
simpled replied on at Permalink Reply
Could you share your code for the JQuery?
jpabellon replied on at Permalink Reply 1 Attachment
jpabellon
First I linked to the datatables jquery plugin:

<script type="text/javascript" src="<?php  echo $this->getThemePath()?>/lib/jquery.dataTables.js"></script>


Then I created a pagelist block and applied a custom template or custom view for the pagelist:

<?php  
   defined('C5_EXECUTE') or die(_("Access Denied."));
   $textHelper = Loader::helper("text"); 
   // now that we're in the specialized content file for this block type, 
   // we'll include this block type's class, and pass the block to it, and get
   // the content
   if (count($cArray) > 0) { ?>
   <table class="display" id="grid">
   <thead>
       <tr>
            <th width="25%">Date</th>         
            <th width="75%">Title</th>
        </tr>
    </thead>
    <tbody>
Remo replied on at Permalink Reply
Remo
thanks for sharing!
jpabellon replied on at Permalink Reply
jpabellon
Hi Remo

Thanks! Ive been meaning to make this into a block but dont have time right now to learn how to make my own blocks in Concrete5. If you can do it or if you can point me to a really simple primer or guide, perhaps I can do it and share it.

Thanks!
Styves replied on at Permalink Reply
Styves
Did someone of you have made a block that can be use easily?

Thanks.
Remo replied on at Permalink Reply
Remo
I'm too busy right now..