Order page by expiry date
I suggest to insert the option of page ordering in the index page by expiry date. articles_by_expiry_date 

| Bernard from nearby-an-airport Associate 6569 posts registered on Sep. 12 2003 | If I understand correctly, this would allow for the ordering of articles by future dates of expiration, right? The page to expire on April-1st would come before the page to expire on June-18st, etc. |
| Fw_crocodile Member 151 posts registered on Jul. 17 2006 |
Bernard: Exactly, if you have a section where you post apointments for example, you can have an index and/or an extra boxe, showing all the apointments with the first one on the top. |
| Bernard from nearby-an-airport Associate 6569 posts registered on Sep. 12 2003 |
Fw_crocodile: please note that if you add the overlay 'day' (without quotes) to a section, all pages posted there will act as daily events or appointments, and that the calendar layout will be activated automatically by YACS. |
| Fw_crocodile Member 151 posts registered on Jul. 17 2006 |
Bernard: effectivly it does, but it seems to me that it is a little bit confusing, to have to apply an option to the index page as "articles_by_publication" to have one sort of listing and an overlay in the advanced option to have another sort of listing in the index page. And if for some reason you insert both, the option of the index page will override the overlay. And i suppose an overlay have more power than just change the listing order, but it doesn't appear clear in the help nor in the section where it is applied where the only result i see at first is the changed order of articles. May be it'is possible to insert in the help some description of the expected result. Please don't feel as i always say something to do and don't appreciate your work. I'm just sharing my feeling and impression using YACS. I really like YACS!! |
| Bernard from nearby-an-airport Associate 6569 posts registered on Sep. 12 2003 |
Fw_crocodile: yes, the overlay trick is surprising, but we had little choice, since the creation of an on-line calendar exceeds by far what can be obtained through simple ordering options. According to the architecture of YACS, an overlay has the option to supersede all other options. Therefore, if you add the overlay day to a section, the ordering and rendering of related pages will be transformed, whatever values you will put in options. Other developers are invited to use this interface to create similar powerful plugins, where applicable.For ordinary content, we still have these options available to tweak the layout, the ordering, etc. Only these have been documented in web forms, because the power of overlays requires good skills in PHP, and the documentation is, actually, the source code of overlays/day.php...
|
| Fw_crocodile Member 151 posts registered on Jul. 17 2006 |
" According to the architecture of YACS, an overlay has the option to supersede all other options. Therefore, if you add the overlay As i say in the previous message " And if for some reason you insert both, the option of the index page will override the overlay. " If i insert both article_by_pubblication and the overlay day the first one will ovveride the second one.
|
| Fw_crocodile Member 151 posts registered on Jul. 17 2006 |
In articles/articles.php i've copied the function list_by_date_for_anchor in list_by_expiry_date_for_anchor and changed just the $order parameter of the SQL query to have the results ordered by expiry date.In view, i've added And in sections/edit.php It seems that all work but i was guessing if i've forgotten something..... There something else i've to do to complete the change? |
| Bernard from nearby-an-airport Associate 6569 posts registered on Sep. 12 2003 |
Fw_crocodile: this is exactly what has to be done. Are you a PHP expert as well? |
| Fw_crocodile Member 151 posts registered on Jul. 17 2006 |
Bernard: Absolutly not! I've afforder just few hours of php elementary coding in an occasion some months ago. Things like: with the variable $lingua saved in the session's data.But this time, in YACS, i've just copied some code and changed a field in a query. And fortunatly the field i was needing was mentioned some lines above
|
| Bernard from nearby-an-airport Associate 6569 posts registered on Sep. 12 2003 | Thank you for this feed-back. This is exactly the kind of thing that we are looking for when we are taking care of YACS code: make it easy for others to understand what is done, and to extend it where necessary. |
Rate this page
Posted by Fw_crocodile on Mar. 26 2007, commented by Bernard on Apr. 2 2007, (popular)