I decided that a weblink rather than a document would be better for a number of documents so I am looking for a way to convert the existing docs to weblinks. By looking ad the db it looks like the only real difference is that the ’type’ is set to ’reference’ rather than ’document’ in the site_content table. And the URL (or doc id) go into the content field.
Is this all there is to it or am I over optimistic about the simplicity?
-
☆ A M B ☆
- 24,524 Posts
Well, I suppose it could be done that way... but weblinks also have no template, and lack a few other fields (take a look at the weblink editing pane). Also, the content needs to be either a valid URL, or just a document ID if you’re linking to internal MODx documents.
http://www.sottwell.com/article-weblinks.html
-
☆ A M B ☆
- 24,524 Posts
Well, so you can! I don’t remember that those fields were available in the weblinks editing pane before... maybe I’m just losing it.
You can use simple mysql query
UPDATE modx_site_content SET type = 'reference' , content=YOUR_ID WHERE id IN (2,4,6,7,8)
where 2,4,6... list of docs to change type.
You can use another condition insteed "id IN (2,4,6,7,8)"
id > 30 AND id < 45
parent = PARENT_ID
etc.
DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. |
DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.
Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.
[PLUGIN] DirectResize - as Maxigallery but for single images ::
Download :: [url=
http://modxcms.com/forums/index.php/topic,21490]
-
MODX Staff
- 10,725 Posts
Yep, as simple as that, and a quick refresh of the site cache. But not being able to do this in the manager is definitely something I consider an annoyance, and we’ll be designing ways to "switch" the "type" of document from one to another in 0.9.7.