Publishing Limited Amount of Files

Is there a way to publish a limited amount of files? We have a need to publish out the latest 2 files out of a potential of thousands files. We could run an on-demand on the 2 files, but I was wondering if there is a way to selectively publish the files in a content list.

Hi Alex

This seems like the standard incremental publish to me. You can start to limit the number of files by adding jcr:path like ‘//Site/yoursite/myfolder%’ to your query, it really all depending on what you mean by “latest 2 files”.

If you’re looking at using the lastmodifieddate then this can be misleading as the TouchParentItems workflow action updates any content item that uses a template containing a autoslot.

If it’s always going to be the same two items then you can create a query that picks out those items.

Cheers
James

Well the scenario is we have a section that needs to be able to reference previous and next stories. Right now there are very few stories and running a full publish will allow us to ensure that all of the next links are available, but if we run an incremental publish it will only publish the latest article, and the previous article will not have a next link because it was not included in this incremental publish.

Long story short, I need to always be able to publish out the 2 most current files, or touch another item that is the previous item, to update it’s next link.

Are the stories a specific content type? Could you create an edition that just publishes that type (if you have a content list created for the type, as well)? (i.e. only stories would be published during that edition)

I do something similar for one of our content types so that the left nav will be updated on other pages.

I could, but that content type will end up being 99% of the content list. I think that we either need to train them to do an on-demand publish of the older story, or run a full publish every night. I was really just hoping for a date command in the JSR query where it knew the current date.

We are also struggling with incremental content lists getting longer and longer. Is it possible to do something like this in Content List query?
SELECT … FROM … WHERE … AND [ContentCreationDate falls within last 30 days]

Thanks…