We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11240
    • 3 Posts
    Hello, I need to make a template that only has the main content dynamic, I’ve done DHTML menues, the footer is also static and there is no sidebar, if I got it right all I have to do is take this:
    <div id="content">
    <h1>[*longtitle*]</h1>
    [*content*]
    </div>
    And put it in the table cell where I want my content... thing is I have no idea what I have to do from here on, where do I put my page? And how do I make it identifieble by modx as a theme?

    If needed I can provide the source code to the index.html file I made and the css and javascript files I linked to it.

    All I need is a working example.. at least I hope I can figure it out from one, I used joomla in the past but it seems to be a completly different theme system smiley
    • Make that part of a template for a full HTML/XHTML page (in the Resources->Manage Resources menu, choose the Templates tab and make a new template), and put in the whole page’s html code, including the part you listed below. Then assign the documents to use that template (or set it to be the default template in Tools->Configuration). Now each page will use that template.
        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
        • 11240
        • 3 Posts
        Did that (setting my template, the one I pasted all my code in as the default template) when I look at the site it still looks like it did after I installed modx, there’s also the issue of where do I put the files needed for my template, like the images, the css file and the javascript files for the DHTML menu, so path’s like "images/image.jpg" work.

        Problem fixed, theme applyes, if you need to have files for your theme put them in the root directory of the site, now I have some content problems, internet explorer is a bit special smiley I put the content div in a table cell with a fixed width, long lines of text stretch out of my table, any way to prevent this?

        This happened because I replaced the <p> tags with
        tags in the source code of the content, I did this because IE and firefox have a different vision of <p> tags, simply put IE doesn’t leave space above one if it’s the first one and FF does..
        • Well, if you look at the template for the default MODx installed page, you’ll see the css is in assets/templates/default. Basically, assets/images is good for displayed images (using <img> tags) while assets/templates/mytemplate/images is good for template background images; the css file will go in assets/templates/mytemplate. Actually, they can go anywhere you like, as long as your paths point to them properly.

          I think you are trying to make the MODx template system more difficult than it is. Basically, you put the entire HTML code for a page in a template, replace content such as text and menus with the various MODx tags, then set each document to use the desired template.

          Take a look at the tutorial I have on http://www.loripsum.co.uk/design-aqueouslightx.html for making a template.

          Once you have a new template, you need to edit existing documents and set the template to the new one. Select your template from the drop-down, wait for it to refresh (to enable any TVs the new template has) then save the document. Or you can go to Tools->Configuration and set the default template to be your new one, and choose which of the radio buttons you like to convert existing documents to use the new template.
            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
            • 11240
            • 3 Posts
            That’s done and it works quite fine, it is indeed easyer than I first thought, right now I need to figure out how to create menues that can hold more that just one dynamic content, like for example 4 previews from the most recent 4 news iems, there’s also the problem with the absence of space above the title of an article in IE
            • That’s what Ditto is for. http://wiki.modxcms.com/index.php/Ditto
                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
                • 11678
                • 160 Posts
                Gravesent; You might find my tutorial - "Beginner’s Tutorial for creating a template" over in General support ->MODx-101 part of the forum useful.
                Cheers,
                Hal D
                  "Today’s headlines are nothing more than whispers of history"
                  • 20289
                  • 958 Posts
                  Quote from: Gravesent at Feb 07, 2007, 12:36 PM

                  This happened because I replaced the <p> tags with
                  tags in the source code of the content, I did this because IE and firefox have a different vision of <p> tags, simply put IE doesn’t leave space above one if it’s the first one and FF does..

                  i suggest you to use basic-css element for your <p> tags, force your desired space or value to the browser! wink
                    [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
                    [td][Wiki] [Persian support forum]
                    [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
                    [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]