We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51315
    • 67 Posts
    Is it possible to make an unpublished resource public and accessible to everyone as it were published?
    I checked the manager settings but i could not find anything like that.
    I would like to use publish/unpublish for archiving purposes.
    Basically, if published some content with an image and a link to the resource is displayed on the homepage.
    Once unpublished, the resource is no more available in the homepage and becomes available only from an archive page.
    I am using pdoResources (&showUnpublished='1') to show the fields but evidently the linked resource is not public/accessible to not logged in users.
    Any suggestion? [ed. note: fredela last edited this post 8 years, 11 months ago.]
      • 33238
      • 388 Posts
      I think the best suggestion is change your strategy, because unpublish means unpublish, no body can see it!

      Might be better if you create a TV filter for the pdoResources results.

      for example:

      Create a TV called "filterTV" with a dropdown YES==YES||NO==NO

      and include this in your pdoResources:

      &tvFilters=`filterTV==YES`

      That means it will display only the pages that has a YES in the "filterTV"

      it's a similar behavior but without touching the publish/unpublish setting.
        --
        ysanmiguel.com
        • 3749
        • 24,544 Posts
        You can make ALL unpublished resources viewable by anyone by giving the anonymous use view_unpublished permission in a Context Access ACL policy for the 'web' context, but I'm with ysanmiguel. You should really change your strategy. You could use a TV or use an existing resource field that you don't need like description, introtext, longtitle, searchable, privateweb, hidemenu, etc.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting