TransWikia.com

How to temporarily disable entries of one site version within a site group?

Craft CMS Asked by Romain Poirier on December 18, 2020

A client asked me to temporarily disabled all of its entries of one of its Site in a specific language. This entries should not be accessible anymore from their URL.

The quickest and cleanest way to hide them would be to delete this Site version, but this would result in deleting all related entries.

As far as I know, the only way to hide them temporarily is to visit each Entry, then disabled the Enabled for site option, and after that make some changes in menu template to hide this Site version.

As there’s a very large number of Entries, this will be very time consuming. Is there any cleaner or faster way to do that?

2 Answers

  1. from the entry section of the control panel, select the site on which you want to disable all entries
  2. select the entries you'd like to disable
  3. use the set status dropdown and select "Disabled" enter image description here

Correct answer by nstCactus on December 18, 2020

I finally ended up with this SQL query, which result to disable all Entries of a site version:

UPDATE `craft_elements_sites` SET `enabled` = '0' WHERE `craft_elements_sites`.`siteId` = 2;

Where 2 is the siteId. After that, don't forget to clear the templates caches.

Answered by Romain Poirier on December 18, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP