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

    Ran into a bit of a problem trying to assign a TV for my main content area in a template I’ve assigned to a few documents. I’ve attempted to assign [*content*] to the document div which will contain the... main content. The div id is ’DetailTextCol’. I’ve copied what I’ve done so far:

    <div id="DetailTextCol">
    [*content*]
    </div>

    Unfortunately, this doesn’t appear to hook into my documents. I’ve been following the documentation as best I can but found this area a bit ’wooly’ - can someone let me know what I’m doing wrong here please.

    Thanks
      • 29181
      • 480 Posts
      Try giving your Template Variable a different name.

      [*content*] is the placeholder for the actual content you create when editting a page. There is probably a conflict.

      Or are you referring to the normal content?
        Adrian Lawley: www.adrianlawley.com
        • 1100
        • 20 Posts
        Thanks for the reply.
        I’ve renamed the TV to [*maincontent*] but am still getting no joy.
        I’ve posted a few screenshots to show what I’m doing - these cover the location of the TV in the template, my content manager screen for input, and the actual area I want to hit with the content.
        If you could have a look at these and let me know where I’m going wrong I’d really appreciate it:

        template: http://www.pantechnicon.co.uk/cms/template.gif
        content manager: http://www.pantechnicon.co.uk/cms/content_area.gif
        target: http://www.pantechnicon.co.uk/cms/target.gif

        thanks
          • 4041
          • 788 Posts
          Have you enabled access to the template variable for that template?

          Look on the template variable page, scroll down to Template access and make sure the template you are attempting to use has a check in the box beside it, otherwise it will not be seen by that particular template.
            xforum
            http://frsbuilders.net (under construction) forum for evolution
            • 29181
            • 480 Posts
            To add to breezer’s suggestion, if it is displayin [*maincontent*] in the actual webpage (as it would appear to be) then try just removing the call from the template, save, publish and then go back into the template and type it in by hand. As of 0.9.6 I have had similar problems when copying and pasting some times. I’m not sure if it’s something I’m doing or something bigger.

            Cheers,
            Taff
              Adrian Lawley: www.adrianlawley.com
              • 27376
              • 576 Posts
              Quote from: Taff at Jul 16, 2007, 12:13 PM

              To add to breezer’s suggestion, if it is displayin [*maincontent*] in the actual webpage (as it would appear to be) then try just removing the call from the template, save, publish and then go back into the template and type it in by hand. As of 0.9.6 I have had similar problems when copying and pasting some times. I’m not sure if it’s something I’m doing or something bigger.
              MODx placeholders should NOT show up on the frontend at all, there are algorithms in place to automatically remove all of these "placeholders" before they are sent to the browser. If they do, it means there’s something in between the character tokens (IE: "<!-- -->"). It’s best practice to always manually enter all of your MODx tags in to the content, especially if you’re using an RTE (like TinyMCE).
                • 1100
                • 20 Posts
                Thanks very much for the replies - really appreciated.
                Breezer - I do have the template variable access ticked.
                Taff and sirlancealot: - I see what you were thinking but the tv visible in the graphic was not actually in the browser, it was overlaid there in the graphic by me to illustrate what I meant.

                I’ve re-made the template in a fresh installation and have got a bit further but am not getting the fully desired result. Below I have links to screeshots of what I’ve done:
                template code: http://www.pantechnicon.co.uk/cms/02/template.gif
                template variable manager: http://www.pantechnicon.co.uk/cms/02/template_variable.gif
                the result: http://www.pantechnicon.co.uk/cms/02/doc_setting.gif

                I seem to have hit the area I need to edit but I still can’t actually enter content with the document editor - all I see is the default value I set in the template variable manager. I’m sure I’m just missing out something very straight forward, but I just don’t know what.


                For reference I have looked at the Minimal Template that comes with the install and see this as the content hook:

                <div id="content">

                <div class="post">
                <h3 id="post-">[*longtitle*]</h3>
                [*#content*]
                </div>
                <!-- close .post (main column content) -->

                </div>
                <!-- close #content -->

                This clearly renders content on the page which I can insert through the content editor and I am trying to replicate this method with my own custom template. However the create/edit template manager states that there are no template variables assigned to the Minimal Template!!! Most confusing huh

                Any help and/or advice would be much appreciated.
                Thanks

                  • 29181
                  • 480 Posts
                  Looking at http://www.pantechnicon.co.uk/cms/02/template_variable.gif it would appear that the TV is assigned to test_01 and not the minimal template.

                  @sirlancelot Next time the problem I mentioned arises I will check the source code, maybe that’s all it is...Cheers

                  Taff
                    Adrian Lawley: www.adrianlawley.com
                    • 1100
                    • 20 Posts
                    Sorry, my mistake in not pointing out that I have applied the TV to the test_01 template, and have applied this template to the page in the screenshot: http://www.pantechnicon.co.uk/cms/02/doc_setting.gif
                    I have been using the Minimal Template only as reference, not actually modifying it. The modifications have all been made to my custom template.

                    My last 3 screenshots showed applying the [*content*] TV to the test_01 template, applying the paramaters for the TV, and the page preview generated from the document with the test_01 template applied to it. All I’m getting in the [*content*] area is the default value assigned in TV manager, shown in the http://www.pantechnicon.co.uk/cms/02/template_variable.gif screenshot.

                    I know this is a bit long winded, but I’m sure i’m following the guidelines and it’s getting rather confusing.

                    Thanks
                      • 29181
                      • 480 Posts
                      This is turning into a fun thread indeed...

                      I still don’t think naming a TV content is good as I mentioned earlier. I recommend renaming it. If that doesn’t work, feel free to PM me with access so I can take a look....if you want of course, and providing it’s online and not locally.
                        Adrian Lawley: www.adrianlawley.com