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 have a case where the client wants to be able to see unpublished documents while logged in and editing. Since you cant change document group from the front-end that is not an option. After all QuickEdit lets you publish unpublished documents but you need to know where they are. and while logged as manager you can view unpublished docs.

    I resolved this with a ditto call in a ’hidden’ chunk. But if I could add these to the live menu (maybe with a different style) this could have worked.

    I can think of a few other situations where this could be useful, all involving front-end site management. I have one site with @ 30 editors and some just don’t like to use the manager so by keeping it in the front-end they are happy.
      [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]
      • 23491 ☆ A M B ☆
      • 1,056 Posts
      Quote from: BobRay at Mar 04, 2008, 03:49 PM

      What confuses me is that if you use it during development, it seems visitors to the site would see the unpublished documents, so why not just publish them?

      Bob


      True. Of course this obviously depends on your development environment, etc.

      When developing on a live production box/active domain, I normally have my MODx sites completely disabled (turned off in site config) until they are ready. Sometimes I choose to develop sites using just the IP Address or the local file system which would work out ok.
        Mike Reid - www.pixelchutes.com
        MODx Ambassador / Contributor
        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
        ________________________________
        Where every pixel matters.
        • 3749
        • 24,544 Posts
        Quote from: dev_cw at Mar 04, 2008, 03:58 PM

        I have a case where the client wants to be able to see unpublished documents while logged in and editing. Since you cant change document group from the front-end that is not an option. After all QuickEdit lets you publish unpublished documents but you need to know where they are. and while logged as manager you can view unpublished docs.

        I resolved this with a ditto call in a ’hidden’ chunk. But if I could add these to the live menu (maybe with a different style) this could have worked.

        I can think of a few other situations where this could be useful, all involving front-end site management. I have one site with @ 30 editors and some just don’t like to use the manager so by keeping it in the front-end they are happy.

        That makes sense. I have a site where I use the Personalize snippet to show a different wayfinder menu to logged in users. IOW, there are two Wayfinder menus in two separate chunks. Logged in users get one and regular visitors get the other.

        Bob
          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
          • 30100
          • 58 Posts
          This is a great addition to the Wayfinder snippet, but I’m wondering if there is a simple way to make it possible for logged in users to show the unpublished documents that Wayfinder now create links for? As I think already said above it would be great to be able to set a different css class for the unpublished documents.
            • 25576
            • 27 Posts
            Quote from: BobRay at Mar 02, 2008, 04:13 PM

            Could you guys satisfy my curiosity about why you would want Wayfinder to work with unpublished docs?

            Personally, I’m interested in this not to include unpublished documents but to ’see through’ them (the way Ditto can).

            For example, for a section of the site I might have a home page called ’Features’ which has a template ’section home’. Within that, I want to store individual documents (one per article), but I don’t want them to inherit the ’section home’ template (or various other attributes of that page that get inherited on my site, such as CSS). So, below ’Features’ I create an unpublished container called ’--articles--’ which has the ’article page’ template. I can then create new pages there knowing they will automatically inherit the right template & other values. But in the Wayfinder menu, I would like it to be able to ignore the ’--articles--’ page, instead showing the sub-pages it contains directly below ’Features’.

            The actual structure of the documents is:

            Features (published)
            |
            +---- --articles-- (unpublished)
            |
            +---- article1 (published)
            |
            +---- article2 (published)
            |
            +---- ...etc...

            But what I want to see in the Wayfinder menu is:

            Features (published)
            |
            +---- article1 (published)
            |
            +---- article2 (published)
            |
            +---- ...etc...
              • 4455
              • 76 Posts
              BUMP - This is exactly the reason I’m looking for the same fix, it seems fairly common to have unpublished docs holding published docs and using ditto with a custom template seems like a lot of work just for some navigation.

              Anyone know how the above fix went? Is it secure?


              Quote from: rotsky at Sep 09, 2009, 05:27 AM

              Quote from: BobRay at Mar 02, 2008, 04:13 PM

              Could you guys satisfy my curiosity about why you would want Wayfinder to work with unpublished docs?

              Personally, I’m interested in this not to include unpublished documents but to ’see through’ them (the way Ditto can).

              For example, for a section of the site I might have a home page called ’Features’ which has a template ’section home’. Within that, I want to store individual documents (one per article), but I don’t want them to inherit the ’section home’ template (or various other attributes of that page that get inherited on my site, such as CSS). So, below ’Features’ I create an unpublished container called ’--articles--’ which has the ’article page’ template. I can then create new pages there knowing they will automatically inherit the right template & other values. But in the Wayfinder menu, I would like it to be able to ignore the ’--articles--’ page, instead showing the sub-pages it contains directly below ’Features’.

              The actual structure of the documents is:

              Features (published)
              |
              +---- --articles-- (unpublished)
              |
              +---- article1 (published)
              |
              +---- article2 (published)
              |
              +---- ...etc...

              But what I want to see in the Wayfinder menu is:

              Features (published)
              |
              +---- article1 (published)
              |
              +---- article2 (published)
              |
              +---- ...etc...

                • 36442
                • 97 Posts
                Doing the same for Wayfinder in MODx Revolution
                Works with Wayfinder 2.1.1-beta5 in MODx Revolution 2.0.6-pl (traditional).
                You’ll need to make some changes in file wayfinder.class.php (should be in core/components/wayfinder)
                First,
                add new parameter in config array near line 69:
                'hideUnpublished' => isset($hideUnpublished) ? $hideUnpublished: TRUE, // pixelchutes - work with unpublished documents

                Second,
                replace the following string near line 477:
                $c->where(array('modResource.published:=' => 1));

                with these:
                // pixelchutes - Work with unpublished documents
                $c->where(array('modResource.published:=' <> ( $this->_config['hideUnpublished'] ? 0 : 2 ))); // fixed
                // $c->where(array('modResource.published:=' => 1)); // original
                  • 36805
                  • 354 Posts
                  I use frontend capabilities of Evo a lot hence I came across this post.
                  Quote from: tirithen at Jun 26, 2008, 03:02 AM

                  [..]I’m wondering if there is a simple way to make it possible for logged in users to show the unpublished documents that Wayfinder now create links for?[..]
                  You can write a snippet called frontEndCMS containing:
                  if (isset($_SESSION['mgrValidated']))
                    $modx->setPlaceholder('hideUnpublished', 0);
                  else
                    $modx->setPlaceholder('hideUnpublished', 1);

                  then in your wayfinder call you use a parameter
                  $hideUnpublished=`[+hideUnpublished+]`

                  Downside #1 is that this cannot be a cached call
                  Quote from: tirithen at Jun 26, 2008, 03:02 AM

                  [..]As I think already said above it would be great to be able to set a different css class for the unpublished documents.
                  Downside #2 is I couldn’t find an easy way to the class to the unpublished doc links

                  Any thoughts on tackling either one of the downsides would make an interesting discussion here smiley