We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13323
    • 4 Posts
    Quote from: vhollo at Jan 05, 2008, 06:54 PM

    Then I tried this instead:
    [[DynContent? &docid=`[+editid+]`]]

    ...and it does the job!!! grin


    Hi there!

    I’m having the same dilemma as you were, but uhm... could you be more specific on this resolution of yours, please,, you’ve a snippet called DynContent?? It enabled the rtecontent how?? Could you share please, I’m stumped over this one, my site will be hosted by many non-tech persons, which already like the newsmanager for adding things with rte content, but who also would need to _update_ the added articles(with pictures, add-on texts etc) but will not be able to access the back end for security reasons, so this snippet of yours could nudge me into the right direction.
      • 31471
      • 206 Posts
      DynContent in the repository: http://www.modxcms.com/DynContent-1679.html
      There’s another snippet you may use instead:
      GetField: http://www.modxcms.com/getField-667.html
      This one is able to get any document field so it’s OK for the Summary’s reach text TV as well.

      As the NewsManager.html document file is describing (read it!), make a TV for the Content RTE, name it for example ’BlogContent’. Then put the @EVAL code (from the docs) or the line [[DynContent? &docid=`[+editid+]`]] - or use a GetField snippet call - in its default value.

      The same goes to the Summary RTE.

      Then make your NewsEditor call including &rtcontent=`tvBlogContent` to have this reach text field on your editor form.
      You may not forget to include &clearcache=`1` to make the newly edited posts instantly visible on the site.

      I hope this helps.
        • 13323
        • 4 Posts
        Quote from: vhollo at May 05, 2008, 08:16 AM

        DynContent in the repository: http://www.modxcms.com/DynContent-1679.html
        There’s another snippet you may use instead:
        GetField: http://www.modxcms.com/getField-667.html
        This one is able to get any document field so it’s OK for the Summary’s reach text TV as well.

        As the NewsManager.html document file is describing (read it!), make a TV for the Content RTE, name it for example ’BlogContent’. Then put the @EVAL code (from the docs) or the line [[DynContent? &docid=`[+editid+]`]] - or use a GetField snippet call - in its default value.

        The same goes to the Summary RTE.

        Then make your NewsEditor call including &rtcontent=`tvBlogContent` to have this reach text field on your editor form.
        You may not forget to include &clearcache=`1` to make the newly edited posts instantly visible on the site.

        I hope this helps.

        Thanks very much!
        Yeah, the problem was that the EVAL’d code returned the same error as for you, otherwise the form fields were correct, but no rte content, even though the same values as you provided now - very odd. but the dyncontent snippet helped! smiley

        Coming from strong LAMP structure and from php-template engines using flat files and MySQL content as tpl-providers I’m still in a learning curve with modx’s virtual dir-tree and the syntax - the TV’s, snippets, chunks, templates and plugins are really blurry for me still, but I’m starting to get the hang of it. Every single asset from the repository I’ve tried has been quite nicely documented, or at least very readable code - for I’m a developer more than a designer - but I’m still "running dumb" with all the mix ups as I trial-and-error laugh

        Thanks again - and hope that once I master modxing, I’ll be an asset to you all smiley
          • 31471
          • 206 Posts
          Others may did solve this bug for themselves, but it wasn’t posted yet.
          The bug: the "Unpublish" button doesn’t change its label even after it’s been pushed.

          In the NewsManager snippet code change (around line 150)
          $publishplaceholder = (isset($publish) ? $modx->getChunk($publish) : "Publish");
          $unpublishplaceholder = (isset($unpublish) ? $modx->getChunk($unpublish) : "Unpublish");


          to
          $publish = (isset($publish) ? $modx->getChunk($publish) : "Publish");
          $unpublish = (isset($unpublish) ? $modx->getChunk($unpublish) : "Unpublish");


          and change (around line 410)
            if ($resource[$x]['published'] == 1){
              $publishvalueplaceholder = '0';
              $publishplaceholder = $unpublishplaceholder;
            }
            else {
              $publishvalueplaceholder = '1';
              $publishplaceholder = $publishplaceholder;
            }


          to
            if ($resource[$x]['published'] == 1){
              $publishvalueplaceholder = '0';
              $publishplaceholder = $unpublish;
            }
            else {
              $publishvalueplaceholder = '1';
              $publishplaceholder = $publish;
            }
            • 29242
            • 3 Posts
            hi, i’ve got a problem.
            no matter who created a document, anyone from the same usergroup can edit the doc. i want to let users edit their own documents only.
            Is there any way in modx to set arbitrary user ang group access rules (read/write) per document or document group, or maybe just a parent document?

            thanks in advance
              • 23510
              • 168 Posts
              Hi

              I am building a system for separate users to be able to manage their own blog items on an individual basis, not as part of a group. I found line 310 in the newseditor as follows:

                        'createdby'   => ($userid>0 ? $userid * -1:0),


              Any idea why the user ID is put in as a negative value?

              I know I can adjust my select statement to suit but was just wondering about that.