Keyword

Date filter on Category View

  • Justin Thomas
  • Justin Thomas's Avatar Topic Author
  • Offline
  • New Member
More
9 years 6 months ago #133829 by Justin Thomas
Date filter on Category View was created by Justin Thomas
My objective here is quite simple. I am listing events that have a "Finish Publishing" date. I display the category and everything is wonderful for events in the future as I set the "publish_down" for the day after the event and that works a treat. My issue is that I would also like to keep "expired" pages visible by direct link.

The archive function doesn't work (I can change the SQL query to find items by publish_down and it shows the correct months BUT, naturally, when I click on those months everything is empty because they have expired. Is there a way I can get this to work?

The other methodology that I can consider is "disengaging" the routine to make the item expire but keep the date in the database then create specific SQL queries for 2 different category views (menu items). The normal one is 'date<publish_down' and the other (archive) version is 'date>publish_down'. This would allow me to create a menu item called archive and load that in a custom modulepos (using Advanced Module Manager through my over-ride).

Can anybody help me with either of these?

Let me know what other information I can provide.

Many thanks

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 6 months ago #133852 by Krikor Boghossian
Replied by Krikor Boghossian on topic Date filter on Category View
I can offer a much simpler solution.
You can set the dates of the event as extrafields and after the expiration of the items simply move the item to another category called something like past-events.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Justin Thomas
  • Justin Thomas's Avatar Topic Author
  • Offline
  • New Member
More
9 years 6 months ago - 9 years 6 months ago #133891 by Justin Thomas
Replied by Justin Thomas on topic Date filter on Category View
Thank you for that suggestion. Sadly I have already been using most of that methodology for the past 4 years on this site. At present I have the date of the event as an extra field and use 'publish_down' to have k2 automatically remove the event from the front-end. The disadvantage of this is that the page, with all the work it has done for the SEO, disappears completely. This reason is also, sadly, why having the user move the event is not going to work. Firstly we're adding a website management step into the process, which is counter-intuitive, and secondly this would change the url from abc.zzz/events/werwer to abc.zzz/past-events/werwer and would, therefore, require a redirect to be implemented (2 new stages and many more admin sessions).

I am already using a core hack for this site as that puts the control of the "complex" aspects back in my hands. I update the site and can immediately check to see if my hack still works. The present hack is simple enough as all it does is exchange 'r_alpha' sorting to be 'publish_down' to give perfect ordering of the events.

I have already tried to utilise the K2Tools archive function to do this and succeeded in having it interrogate the db with publish_down the only problem was that the item had "expired". If I could find a way to cancel the expiry but leave the date in the database then I could use a custom SQL query to retrieve items moving forwards or backwards and then the items just stay exactly where they are, never unpublished, keeping their search engine ranking and increasing the number of landing pages for the site. Basically I need to simplify the system and then make unique SQL queries based off now (much like the function in K2Tools archive) to achieve the front-end results needed.

Any hints as to where the syntax is that unpublishes/expires an item?
Last edit: 9 years 6 months ago by Justin Thomas.

Please Log in or Create an account to join the conversation.

  • Justin Thomas
  • Justin Thomas's Avatar Topic Author
  • Offline
  • New Member
More
9 years 6 months ago #133892 by Justin Thomas
Replied by Justin Thomas on topic Date filter on Category View
The other option would be to use the 'created' date for the event and ensure that modifications do NOT update this date. That would be much simpler. Any idea how to stop K2 recording modification dates? I would NEVER need this functionality for this site as it is single admin user. This would be MUCH simpler indeed.

Please Log in or Create an account to join the conversation.

  • Franz Wohlkönig
  • Franz Wohlkönig's Avatar
  • Offline
  • Platinum Member
More
9 years 6 months ago #133898 by Franz Wohlkönig
Replied by Franz Wohlkönig on topic Date filter on Category View
Hi Justin,

my Solution was to show Events in Modules and let Modules expire. So Items are always shown (never delete a published Item) cause of indexed by Search-Sites and never use "publish_down" by Collegues.

Regards

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum