Results 1 to 5 of 5

Thread: News / Archive

  1. #1
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default News / Archive

    I need to make the news page as:
    - show the actual news
    - if a news is older than 6 month it should go to the archive
    - the archive should be shown per year

    My question is if is there a possibility for my second point (to put automatically in the archive after six month)? Or is there any other possible workover in contao for this?
    Thanks!
    Last edited by zoltanseer; 04/25/2014 at 12:19.

  2. #2
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default Update:

    Maybe it's more logical (easier to understand) to show only the last six month's news, and the other in the archive. But how could I do this?

  3. #3
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default Could be a solution?

    Ok, it seems there is no good solution for this. I was thinking to use categories and cronjob. Set up a monthly task, which checks the date of every news which is not in the 'Archive' category, and if it's 6 month old, than add the post to the `Archive` category. For me it seems this is not a bad solution, but I am still open for a better one. If there isn't any, than any help with this would be awesome, because I don't really have any ideas (yet) how to add a category for a post from code. I'm using the `news_categories` extension.

  4. #4
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default Last post here

    Ok, the faster, the better. Only one last question: if I change files in "/system/modules/news/models...", would be this overwritten with the next core update? If yes, what would be a solution if I want to change minor things in the news model?

  5. #5
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    Yes this would not be update safe. You can write an own extension which extends the news extension. But maybe you can simply filter the desired news within the template.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •