We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43451
    • 5 Posts
    I was thinking of using nodes to store data.
    Let's say I have a news page consisting of...well....news items..

    Under the news document node I want to create a folder called "News items" and under that a number of DataNodes with three properties: Date, Headline and Content.

    I tried doing this by creating a news template with these three data types as TV's. I then ignore the Content field which is just in the way. I'm guessing that I can get the TV's by using the API and loop through them (which I have not looked at all all). But the main issue here is that this does not seem to be the right way because a template/document in MODX seems to be designed to always become a page. I want a 404 url if someone tries to access a data node directly. This is possible in Umbraco by creating a DocumentType and not binding it to a template. But in MODX there is just templates.

    Any thoughts on that?

    Bonus question: I have an existing PHP site. I wan't to use my existing "content" php files but MODX require me to return strings. This means rewriting all my PHP code. Any way around that? I want to just use my PHP which happily mix html and code.

    [ed. note: barryslisk last edited this post 13 years, 5 months ago.]
      • 35150 ☆ A M B ☆
      • 191 Posts
      1st question: Have a look at MIGX. It'll do—I think—just what you're looking for.
      Bonus question: phpTemplates. I don't have any experience with it, but it sounds like it might be helpful for you.
        Extras :: pThumb • Resizer • imageSlim • setPlaceholders