We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36398
    • 13 Posts
    Hi, i am not really new to mode but my last usage was around 5 Years ago so yes i am new. smiley

    Atm i have to questions i could not find a solution or way to handle for.

    1. I have in Template content for example <h2>[[*longtitle]]</h2> but i only want to output the h2 if there is a long title filled in

    2. What is the best way to handle components, for example i have in temlate a component with teasers, different articles, That could be 1 to X. How can i make that useable by author so he can fill that component with data i i got trough a loop and render it out.

    2a. Can i build components to add them to different pages on predefined areas? So like in Wordpress define a area where i can choose from a list of components.

    Sorry if that had been answer to often but i could not find it, maybe because i did not know what to search for.
      • 3749
      • 24,544 Posts
      1.

      [[*longtitle:ifempty=``]]



      The other questions sound like a job for Template Variables (TVs) -- possibly MIGX TVs.

      A TV can have a drop-down list where the user can select an option. The choices visible to the user can be plain text, while the actual values could be file or image paths or the names of chunks containing the stuff you want displayed.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting