Hi guys! So my client requested that we use modx for the project, and I'm a total noob about it. I've been diggin through the documentation, it kinda makes sense where you can use tags to template pretty much anything, and I really like it.
Template Variables
Alas, I'm utterly confused by the concept of TVs and resource management. Let me continue with an example here. So we have this testimonials page, and my client wants to be able to enter more items on that list. Each item will consist of an image, the testimonial and a name.
How would I add this functionality into modx? Right now, I'm thinking about creating a template for testimonials, 3 TVs for the data, (relevant question: can one tv hold more than one input option? can't see anything about that under the input options tab) and a resource for each item on the list. So when the client wants to enter a new testimonial he'll just create a new resource under the testimonials folder. Then I'll just call the getResources plugin in the main template to print them into the page.
Does this make any sense? Or am I completely off track here?
Resource Management
I'm thinking about having a folder called pages, and list the pages under there. and also a folder for each data entry point. IE. I'll have folder named testimonials and the client will create new data by creating a resource under there. Same for features and etc.
Is this the way to go here? He granted me access to one of his older projects and the whole thing was a mess, I couldn't even understand how they used the resources, so I wanted to make it easier for both of us by creating such a resource structure.
Is there a better practice? If so, how?
An easier way for if statements
Situation: We have some content right under the navigation. It's a big bold text with some images and marketing text on the homepage, and the name of the current page for the rest of the pages.
I installed the If snipplet, but I'm not sure if it can hold html code as the "then" condition. So I'm thinking about creating a chunk out of that bit in the main page and calling it for the "then", and calling the page title tag for the "else". Sadly, that bit on the homepage is pretty much the main selling point and I'm sure he'll be testing it a lot. So going into the chunk to change that seemed a bit needlesly difficult.
Can the "then" condition hold html? (What would be the correct syntax for that?) Or is there an other way to do it from the resource itself?
CSS Sprites
Again, from the testimonials page example: We'll probably have 10-15 small thumbnails in there, which will surely effect the load times quite a bit unless it's in a sprite. Since my client will be updating this regularly, is there way to do it by grabbing them from TVs, creating the sprite and then outputting it in an automated fashion? This one is obviously not that crucial, but it's a good practice and I wanna do it, so any suggestions on this are most welcome.
Thank you!