We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7111
    • 30 Posts
    To be more specific, is it possible to password protect entire documents yet allow a web user who does not posses permissions to view the entire article the ability to view the introtext and view menu links to other articles that have restricted permissions?

    I am currently using ditto to retrieve the summary field of the document like so:
    [[Ditto? &parents=`51` &tpl=`frontpagesummary` &sortBy=`menuindex` &sortDir=`ASC` &display=`all`]]

    the tpl:
    [+phx:if=`[+myPhoto+]`:isnot=``:then=`<p class="mug-photo"><img src="[+myPhoto+]" /></p>`:else=` `+]
    [+phx:if=`[+cutline+]`:isnot=``:then=`<p class="cutline">[+cutline+]" </p>`:else=` `+]
    <h1>[+pagetitle+]</h1> 
    <p>[+introtext+]</p>
    <p class="more-story"><a href="[~[+id+]~]" title="[+longtitle+]">Read full story...</a></p>

    "51" is the container that hold the articles. Is there a way to override permissions to view certain fields of a document? Basically, the entire site requires a subscription to access the full content, I just don’t want the page to be completely blank to users who do not possess the required permissions to view the content.

    I can see from searching that this has been brought up before, but can’t find any solutions?
    e.g. http://modxcms.com/forums/index.php/topic,13823.0.html
      • 7111
      • 30 Posts
      So I thought I had found the solution using &hidePrivate in the ditto call, but it doesn’t work at all. I am using Ditto 2.0.2.

      Here’s the ditto call:
      [[Ditto? &parents=`51` &hidePrivate=`0` &tpl=`frontpagesummary` &sortBy=`menuindex` &sortDir=`ASC` &display=`all`]]


      Am I missing something? huh
        • 7111
        • 30 Posts
        No ideas? I’m curious as to why the &hidePrivate parameter is not working as it should be. Am I misunderstanding the purpose of this parameter?

        Please help?
          • 8461
          • 205 Posts
          is &hidePrivate=`0` not the default, should it not be &hidePrivate=`1` although I may be wrong
            • 7111
            • 30 Posts
            Thanks for replying edge. As I understood from the ditto documentation, 0 shows private documents, 1 hides private documents. So it should be set right. I don’t know where I’m going wrong here.
              • 7111
              • 30 Posts
              So I take it that this is impossible to implement. Is there any other way to do this like make a separate document that contains a summary that will not be set as private then go to the private page when the "Read full story" link is clicked? It sounds like a bunch of extra work but I’m desperate at this point.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Why not use a custom Ditto template that displays what you want, with no "read more" or any other link to the news page?
                  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
                  • 7111
                  • 30 Posts
                  Well, it’s for a online version of a local weekly newspaper. The point is to entice the end user to want to subscribe. I will already have to make 30-40 article documents a week plus all the other content that is open to the public, I don’t want to do any more work than what is necessary. Especially being that I am the one that is responsible for the layout of the offline print version as well. I was just hoping to automate the process as much as possible.
                    • 7231
                    • 4,205 Posts
                    Is the container/folder document published? In this case you may need seeThruUnpub.
                      [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&#39;t know what it is.
                      Do you, Mr. Jones? - [bob dylan]
                      • 7111
                      • 30 Posts
                      No, the containers are not published so they would not show in the navigation menu. I tried appending the seeThruUnpub parameter to my ditto call. No luck. Here is the structure of the documents/containers:



                      Ditto call:
                      [[Ditto? &parents=`51` &seeThruUnpub=`1` &hidePrivate=`0` &tpl=`frontpagesummary` &sortBy=`menuindex` &sortDir=`ASC` &display=`all`]]