We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7231
    • 4,205 Posts
    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?
      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

      Something is happening here, but you don't know what it is.
      Do you, Mr. Jones? - [bob dylan]
      • 28042 ☆ 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
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 7231
        • 4,205 Posts
        but weblinks also have no template
        That’s interesting and I have read that before, but it seems that you can assign a template to it and it will give you access to those template variables. Not sure how this reflects in the front end (specially with Ditto since I plan on using some TV values of a weblink).

        Actually that’s why I dod not use weblinks in the first place, since I needed tvs for custom info so I opted to make a document. But now I am under the impresion that you can assign a template and template variables which would fit my purpose well.

        Am I mistaken in believing that I can assign a template and TVs to a weblink?
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 28042 ☆ 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.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 19164
            • 1,215 Posts
            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]
              • 22303 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.