https://discord.umbraco.com logo
#help-with-umbraco
Unpublishing block list items
# help-with-umbraco
u

.dmcx

02/12/2024, 3:35 PM
Is there any approach to handle scheduling publish & unpublishing individual block list items? The only way I can think of is to schedule a publish of the page with a set of changes however the issue is if I want to schedule a change then schedule another change to then remove this content this isn't possible.
s

Sebastiaan

02/12/2024, 3:57 PM
This is not yet possible, but it is in the roadmap - if you want to read what the plan is you can find it here: https://github.com/umbraco/rfcs/pull/39 Currently there is no date for when this will be implemented, but it is scheduled for AFTER Umbraco 15 (December) - https://umbraco.com/products/knowledge-center/roadmap/ ("Reusable Block Content for Umbraco CMS")
j

Jason

02/12/2024, 4:35 PM
You can add your own publish/unpublish date/time properties to the block settings and add your own logic at render time (or in the content delivery API).
u

.dmcx

02/12/2024, 4:38 PM
Yeah this was my next port of call however isn't quite as nice as they wouldn't appear as unpublished in the tree in the back office
j

Jason

02/12/2024, 4:47 PM
Yeah, though I don't think there can ever be a single coherent UI for handling publishing of content and blocks given how logically different they are. If having them work the same way as nodes is important then you can always use child nodes, or a repository of nodes, and pull them together into pages at render time.
r

Rob Schall

02/12/2024, 9:54 PM
I agree with the temporary approach of adding a go-live/end date field(s) to each block added. We already add a "hide block" field to allow easy removal/hiding of a given block within a blocklist, so I could see the logic/ease of adding quick date fields.
d

deanleigh

02/13/2024, 8:02 AM
For some of our sites we have a publish date on blocks and other a simple hide/display but I generally add some code to the label to let the user know if a block is published. You can add an Angular filter in the label:
Copy code
{{$settings.wFtSetPropPublished == '0' ? '🚫 ' : "🟢 "}}{{$contentTypeName}}{{wFtPropTitle ? ' - ' + wFtPropTitle : ''}}
to acheive this. https://cdn.discordapp.com/attachments/1206624527199502446/1206873038969110548/msedge_sNMK26hbEg.mp4?ex=65dd971b&is=65cb221b&hm=e1ada1409a3d613a3783830581c73f92f23b00ec917a0c986198f3d0c39876d9&
u

.dmcx

02/13/2024, 12:26 PM
Great solution! Thanks