We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23616
    • 7 Posts
    Evo 1.0.2

    I have two resources. Editors and Publications.

    I would like to, after adding a new publication and selecting an editor name from a dropdown list, display his contact details on publication page.

    I would be really grateful for any help on this.
      • 3749
      • 24,544 Posts
      Here’s probably the easiest way to do that. It would be more "correct" (and faster and easier to maintain) to have a Tpl chunk for formatting the profile for each editor and pull the data from the user profile in the DB, but it would be much harder to get working (although you might be able to use WebLoginPE for it).

      Here’s the quick and dirty way:

      Put each editor’s contact information in a separate chunk named after the editor and formatted the way you want it to appear on the page.

      Create a drop-down list (or radio option) template variable called EditorProfile with Input Option Values like the following:

      John Doe==@CHUNK johndoe||Richard Roe==@CHUNK richardroe||Jane Doe==@CHUNK janedoe

      Attach that TV to your page template (by checking the box for the template when editing the TV).

      When you edit a document, you should see just the Editor’s names where the TV appears. When you select one, the full profile will appear on the page where the TV tag [*EditorProfile*] is placed.
        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