Has anyone made a bare bones custom resource class to get resources out of the tree? think articles without the extra fields.
-
☆ A M B ☆
- 24,524 Posts
Quote from: pdincubus at Oct 01, 2013, 06:52 AMQuote from: g5604 at Sep 18, 2013, 05:55 AMHas anyone made a bare bones custom resource class to get resources out of the tree? think articles without the extra fields.
getResources probably does what you want, when combined with getPage you'd be able to paginate it too. What fields would you need to output?
thanks, but I am talking about the back end.
You could also try MIGXdb -
Will take a look a MIGXdb, thanks.
Resource Hider is a good option. Another way is to just set their show_in_tree field to false.
You could set up a page with getResources to provide links for NewsPublisher to manage them in the front end, or use links to the Manager (a la Articles) to Manage them in the Manager.
Quote from: BobRay at Oct 01, 2013, 01:04 PM
or use links to the Manager (a la Articles) to Manage them in the Manager.
This is the bit I am not sure how to approach, are there any tutorials ?
-
☆ A M B ☆
- 24,524 Posts
You need to know what the link to editing a resource is - http://localhost/revo229/manager/?a=30&id=1
So you would need to have a link like this for each hidden resource, using a variable to replace the id value. Something like this as a tpl for a listing snippet
<li><a href="manager/?a=30&id=[[+id]]">[[+pagetitle]]</a></li>
This is probably purely academic, but if that action ID of 30 ever changes, this would take care of it (and allow you to get other action IDs as well):
<li><a href="manager/?a=[[GetManagerAction? &act=`resource/update`]]&id=[[+id]]">[[+pagetitle]]</a></li>
<?php
/* GetManagerAction snippet */
$updateActions = $this->modx->request->getAllActionIDs('core');
return = $updateActions[$scriptProperties['act']];