First off thank you for whoever can help me out. I’m a newbie to Modx and I’m trying to understand some concepts in Modx, so I’m not trying to fix or solve anything, but trying to understand how I would do it and what tools I would use.
Here’s what I’m trying to do:
I made a simple website: www.uwhousing4rent.com for a family friend and I used CMSMS and I want to redo it in Modx. I want to create an input form, which they can input things such as rental price, security deposit, cleaning fee, the address, and maybe a few other details (easily doable with TV’s from what I understand). I would categorize each property either home or apartment, and based on which category is selected it would show up in that section of the main homepage. What if I want a field to display only if there is a value?
I just don’t know where to even begin.
1. What are repeating content blocks based on a input form called?
2. What Modx tools should I be looking at and studying?
3. What concepts in Modx should I familiarize myself with?
4. How would I do it?
Thank you again!
Jason
Cool...thanks. I’m powering through all the resources you both sent. I’ve got some of the fundamentals down. I think that answer to my question above has to do with using the Ditto Snippet, or possibly having to learn php and write my own snippet. I guess I would create a sub-section in the document tree that would have each home or apartment that my friends have. I would assign several TVs to a template that would be used by those documents in that portion of the sub-section. Although its not clear at this point, how I would use Ditto to pull those TVs. Going to keep reading...but any suggestions would be helpful.
Thanks again for everything!
-
MODX Staff
- 2,502 Posts
Ditto is in fact the snippet you want to use. You can use it to iterate any document content you want. It allows for filtering and tags as well.
http://ditto.modxcms.com/index.php
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
I’ve also been reading up on Ditto. Thanks for the link.
Here’s what I’m thinking will work, and place tell me if my process is correct or not.
1. I create a sub-section off the main tree called something like: "Properties".
2. I create TV’s with all the variables I will need, assigned to some template (doesn’t really matter).
3. I create documents within that sub-section for each property.
4. I create a Chunk that is essentially a template for how I want properties to display and defines which TV’s to use.
5. On the the homepage, I create two ditto calls, one for Apartments and one for Homes - although I’m not certain at this point how to filter yet
6. In the ditto call for each, I specify the Chunk I want to use to format the output.
What do you think?
That sounds about right except that step 3 will be unnecessary since the TVs will automatically show up for all documents that use the tempate with the TVs assigned to it.
You may also want to have Apartments and Homes under two separate parent documents.
You will probably want some of the TVs to be drop-down menus. For those, just select that option when you create the TV and put the option values in separated by double pipes (e.g. option1||option2||etc.).
Nice! I’m super excited. I also want to learn how to do custom backend templates so I can make it even easier for people that I turn websites over to, to update.
Additionally, I need to read up on whatever gallery comes with Modx, because I would like the ability to upload and assign photos to a property.
Thanks again!
Another quick general question. Does it make sense then to put all your published pages into a subsection off the main tree...into something like "pages?" That way it organized better? An end-user could be confused by the document tree, and why some content is published and why some is just there to serve other pages.
-
MODX Staff
- 12,272 Posts
That depends on how you have your menus built and a myriad of other things. I would suspect that a Properties > Apartments / Homes > Individual Properties structure would make sense to any user.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me