We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20387
    • 1 Posts
    Hi,

    I’m quite new to MODx, but I’m already impressed and think that this is the real tool for me. I’m quite good in PHP, HTML and CSS. I want to use MODx to create a club page. Within this club page I want to have a page for each member of this club (not to be confused with web users).

    I am going to create the page for each member manually and want to assign some parameters (name, age, hobbies, position - later on to display the members with a snippet in Google Maps, ...). I think the way to do this with MODx is to use TV for the template for these member pages and use the TV within the template to render out the member’s details.

    Now to my problem: I don’t want to have to maintain two templates. One for the member pages and one for the other pages.
    I thought that maybe a solution was to have two pages for each member:
    - One page with a template with the TV for member details, which is used only to render the detail section (template without surrounding <html>, ...)
    - One page (main template assigned to it) including the render of the previous page with the @DOCUMENT binding

    Unfortunately this has not worked, because the @DOCUMENT binding only rendered the content of the page with the member details. It was not including the render of the detail template.


    Any idea what is the best way to solve the problem? Maybe I am using a totally wrong approach.

    Thanks for your help.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You can use the same template, just leave the default value of your TVs empty, and ignore them on the non-member pages.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 34017
        • 898 Posts
        Susan,

        How do you ignore empty TV’s?

        Thanks,
        Chuck
          Chuck the Trukk
          ProWebscape.com :: Nashville-WebDesign.com
          - - - - - - - -
          What are TV's? Here's some info below.
          http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
          http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Don’t put anything in them.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org