Hello,
I am just about to give an Evo 1.0.15 website a refresh and have a question about template variable content.
We don't need a lot of the existing TVs and nor their content (some TVs were used for filling out the RHS column with extra content on some pages) and the website has about 100 pages or so. The TV's include a combination of standard TVs and MultiTV TVs.
My query relates to: When deleting a TV from an EVO website...
Does the content for that deleted TV also get removed from the database? (That's best case scenario for us and nothing else to do)
Or does that content for the deleted TV stay in the database? In which case, is there a way to remove that content for the relevant TVs to keep the database streamlined without individually editing the content for the TVs on every page prior to deleting the TVs we don't need?
Thanks in advance for any help.
To my knowledge without looking it up I'd say it does NOT get deleted. Re-constructing deleted TV's should bring back the content. Test it!
Warning! Backup the database first!
Using phpMyAdmin:
DELETE FROM `modx_site_tmplvar_contentvalues`
// This would delete everything. You have to modify the query to only delete based on TV id.
[ed. note: mrhaw last edited this post 11 years, 5 months ago.]
Hi MrHaw,
Does that delete absolutely all TV content? If so, I can't use that method for this situation unfortunately as we are keeping about half the TVs.
Is there a similar way to delete content like that just from specific TVs?
eg say there are two TVs I'd like the content deleted from - one TV is called apples, the other TV is called bananas. Any ideas?
Thanks for your help.
Yes if you browse to the table using phpMyAdmin
you should be able to see what the
column name is for tv id. Let's call it
X
and the tv Id in MODX is
15. // I believe ManagerManger plugin would reveal TV id's. Else you need to
figure out what db table makes the connection between name and id.
Then you would execute:
DELETE FROM `your_database`.`modx_site_tmplvar_contentvalues` WHERE X='15'
But first download the database and play with this on a local webserver like xampp
Thanks so much MrHaw, I will try this tomorrow.
I never used MultiTV (I am ashamed). Open an issue here
https://github.com/Jako/multiTV
and ask Jako!
Ah wow, multiTV is absolutely sensational - it's a wonderful / must-have tool IMHO for Evo users.
It's great for per page slideshows, photo galleries, file lists etc - anything pretty much. It keeps the TV section of resources much neater by eliminating the need for extra TVs.
I think its only down side is that multiTV content is not currently searchable with AjaxSearch. (I would love someone to prove me wrong on that.)
Give it a crack sometime - you will not be disappointed.
Good suggestion MrHaw, thanks.