We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38713
    • 91 Posts
    alexmercenary Reply #1, 13 years ago
    Hello guys,

    I have a MIGXdb set up which displays a list of machines and then when you click on one of them in the list it takes you to the full detail page of that machine.
    As it is at the moment if I un-publish a machine (row) in the migxdb then they don't display in the list which is correct however if you go to the direct url the machine is still displaying.

    Should this automatically be taken care of by modx's core functionality (like when you unpublish a resource it sends you to a page not found resource) or would i need to create a custom plugin to deal with this?

    Thanks,

    Alex
      Twitter @alexmercenary
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Are you logged in as a Manager user? If so, you can see unpublished resources. Always check things like that with another browser that isn't logged in to the Manager.
        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
        • 38713
        • 91 Posts
        alexmercenary Reply #3, 13 years ago
        I'm not logged in no. It's a custom table though that I'm using to generate the full view so maybe it just tie in to the MODx core functionality. I've just added a redirect condition for now to the plugin which generates the friendly urls and forwards the users from the machines list page to the full view to redirect to the error page if unpublished.

        Not sure if this is the correct way of going about things but it works for now.

        Any advice is of course always welcome. Thanks for getting back to me Sue!
          Twitter @alexmercenary
          • 4172
          • 5,888 Posts
          I think checking the published-status in your redirect-plugin is ok.
          Additional you should have a conditional redirect inside your detail-snippet or at least a where-filter, which doesn't allow to show unpublished details.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!