The first of all a BIG thanks to whole MODX team!!!
What is the best practise in modx revo if I have a rather big, for example, news section of the site considering folder (resource containers) structure ??
For a sake of argument, let’s say we have each day 2-3 news (after a few years it could be rather huge).......
Would it be?
Make a parent resource container called news
Make a child resource container 2011 (that is the year)
Make a child resource container each month - let say for January, 01
In that child resource container 01, put all news for January
If so,
resource container for year and month contains nothing and it’s hidden from menus?
Another question!
Is it possible to automatically create those empty resource containers (for year and month)?
I am guessing I try to avoid every month some moderator of the site calling me to create those ’folders’?
The whole point of me asking this is:
1) Imagine there are 1000 news. When moderator clicks on ’news’ resource container, it’s extremely difficult to find or do anything if a 1000 resources show up under it..
It’s so much easier if the moderator sees the year and month
2) Does making those empty resource containers helped performance/cashing (I am sure it does!). Let’s say if I want to get all users who publish something in 2011, with getResource (or some other snippet) i’ll target just that year and not the whole news section
Thanks in advance for your opinions & suggestions,
Ivan
Everything is EASY if you wanna do it badly.
Hi Ivan (great name by the way

)
While you could in theory create large numbers of sub-folders to split the archive of news into manageable amounts, it would probably be better for you to put the data in a custom table (eg news) that uses specifically designed fields to hold the specific ’resource-type’ you want. Performance-wise it is better, and manager-wise it is also both simpler and more manageable.
Have a look at
http://rtfm.modx.com/display/revolution20/Using+Custom+Database+Tables+in+your+3rd+Party+Components first.
Then either follow some of the other tutorials on Custom Manager Pages, or download XDbedit
https://github.com/Bruno17/xdbedit from forum member Bruno17.
Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
Thank you for your reply.
I’ll try to implement those solutions you suggested!
Thanks,
Ivan (I know awesome name)
Everything is EASY if you wanna do it badly.
Ivan,
Curious as to which route you ended up going with your resource structure. I’m about to embark on a 6 month journey of converting 3 very large websites to MODX where each one has thousands of resources. They all have daily emails that get sent to around 200,000+ people a day.
I was thinking of either:
1. organizing them by year then month and place the daily entries in the month. and use tags to classify the entries in a ’category’
2. Organizing by category and have more items in each category and use Archivist for the year/month display
3. Going the custom table using xdbedit and then writing custom snippets for each display
They all have strong pros and cons and I want to go the best way possible since it will affect multiple sites (all the same client)
What did you do? Any other recommendations out there?
Thanks!
44+ MODXed sites and counting...
-
☆ A M B ☆
- 3,141 Posts
I’d advise for a custom solution.
While it’s easy to use the resources, there’s quite some unused overhead you’re not going to use and it’ll definitely be noticeable at that number...
Your own solution, when properly developed, would save on the overhead and might just make it more straightforward to use, too. xPDO is a joy to work with for CRUD actions.
(You could also solely base it on xPDO if needed.....)