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?
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
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP