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
-
☆ 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.
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
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.