News items by topic, with top stories

I have an interesting challenge.


News stories are added underneath a series of asset listings by topic (up to 6). This is done by a script from XML generated from our internal publishing engine which takes content out of our broadcast news system.



As it is planned, updates to any story will replace the original content and update the last published time (via script) keeping the URL the same. This means that incoming links get the latest version of the story.



One group of stories is called top stories, which end up on the home page. At the moment, we plan that when an item is a top story it does not appear in a section, but may do so later when it is replaced by other breaking news.



The challenge is to have to the URL remaining unique for the life-cycle of the story.



If a story stays in a topic and does not move this is fine, but if it was top story the challenge begins. If people use the top story link then they won't see any updates when it had been moved into a topic later.



The text system is able to track that a story is in a topic AND in the top stories.



I suppose that a link could be created for these - one in the topic and one in top. But how to stop them sowing in a topic listing when they are in top, and how to make them show again in a topic when they are not in top?



Any thoughts on doing this via a script would be appreciated.

Let me just be unhelpful and say "no idea". Goodluck :slight_smile:


There is an "Add Remap" trigger action that automatically adds the Site URL + Asset ID as a remap for an asset. Using a trigger, you can create a short URL for each news item and then use that URL instead of the full one when displaying assets. That way, the URL will never change, even when the asset moves.

For example, when a News Item with asset ID "123" is created in a Site with a URL of "www.domain.com", the trigger will add a remap of "www.domain.com/123" to that News Item. You can then print that in an asset listing with an <a href="http://www.domain.com/%asset_assetid"> tag. When the asset is moved, the remap system will follow it through to its new destination.

Interesting idea. If you do go this way, make sure your scripts are updated to remove old remaps when you cycle your news items and the table is vacuumed. That remap table gets queried for every page load so a large table could decrease performance.

Thanks both.


It looks like a lot of work, and I'd rather keep things simple, so I have reworked how stuff will appear on the site.



It means that top stories WILL be links of stories in other categories and can appear in both, and I won't have to expire the Top story links. If someone links to the top story version it does not matter because they are the same asset id. An update on the catergorised version will update the (probably not visible anymore) top story version.



The joys of updating matrix from a remote system …



I am just working on the spec so expect to hear from someone shortly :slight_smile:



cheers,

R