We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6430
    • 6 Posts
    I must not understand this cause I cant get page to show content. I have a template set with the following code. In resources I have "Home" with the code listed below. When I go to preview "home" all I can see is the code set for template. I am taking an existing website and trying to convert into MODx but I am new to cms so I must not understand something. I am aware you need [content] listed in the template but doesn’t work like I would expect. I am sorry I am a huge noob at this. Anyone able to explain what i am missing. The site is done in tables which I know is old school but will take me some time to convert to css.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Sample Site</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    		<link href="css/basic.css" rel="stylesheet" type="text/css" media="all" />
    		<csscriptdict import="import">
    			<script type="text/javascript" src="jscript/CSScriptLib.js"></script>
    		</csscriptdict>
    		<csactiondict>
    
    			<script type="text/javascript">
    				var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    				document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    			</script>
    			<script type="text/javascript">
    				try {
    				var pageTracker = _gat._getTracker("xxxxxxxxx");
    				pageTracker._trackPageview();
    				} catch(err) {}
                </script>
    
    			<script type="text/javascript"><!--
    				var preloadFlag = false;
    				function preloadImages() {
    				if (document.images) {
    					pre__01home = newImage('/images/home.jpg');
    					pre__02gallery = newImage('/images/gallery.jpg');
    					pre__03bio = newImage('/images/bio.jpg');
    					pre__04press = newImage('/images/press.jpg');
    					pre__05contact = newImage('/images/contact.jpg');
    					preloadFlag = true;
    					}
    				}
    
    			// --></script>
    		</csactiondict>
    	</head>



    Resources/"Home"
    <body onload="preloadImages();" bgcolor="#FFFFFF" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
    		<div align="center">
    
    			<table id="Table_01" width="1073" border="0" cellpadding="0" cellspacing="0">
    				<tr height="64">
    					<td rowspan="7" valign="top" height="575"><img id="mpanel_01" src="/images/mpanel_01.jpg" width="241" height="575" alt="" /></td>
    					<td width="643" height="64"><img id="mpanelmain_02" src="/images/mpanelmain_02.jpg" width="643" height="64" alt="" /></td>
    
    					<td rowspan="2" valign="top" height="575">
    						<table id="Table_01" width="354" border="0" cellpadding="0" cellspacing="0">
    							<tr>
    								<td colspan="3" rowspan="2" width="354"><img id="mpanel_03" src="/images/mpanel_03.jpg" width="354" height="125" alt="" /></td>
    
    								
    							</tr>
    							<tr>
    								
    							</tr>
    
    							<tr>
    							
    							  <td valign="top" width="110"><a onmouseover="changeImages('id01home','/images/01home.jpg');return true" onmouseout="changeImages('id01home','/images/01home.jpg');return true" href="index.html"><img id="id01home" src="/images/01home.jpg" width="110" height="35" alt="" border="0" /></a></td>
    							  <td rowspan="6" valign="top" width="159"><img id="mpanel_06" src="/images/mpanel_06.jpg" width="159" height="450" alt="" usemap="#layout2_092080e37" border="0" />
                                    <map name="layout2_092080e37">
    								 <area shape="rect" coords="72,435,158,454" href="http://www.website.com" alt="" target="_blank" />
    
    								</map></td>
                                    <td rowspan="6" valign="top" width="85"><img id="mpanel_07" src="/images/mpanel_07.jpg" width="85" height="450" alt="" usemap="#layout2_092080e37" border="0" />
                                    </td>
    							  <td><img src="/images/spacer.gif" width="1" height="35" alt="" /></td>
    							</tr>
    							<tr>
    								<td valign="top" width="110"><a onmouseover="changeImages('id02gallery','/images/02gallery.jpg');return true" onmouseout="changeImages('id02gallery','/images/gallery.jpg');return true" href="gallery.html"><img id="id02gallery" src="/images/gallery.jpg" width="110" height="35" alt="" border="0" /></a></td>
    								<td><img src="/images/spacer.gif" width="1" height="35" alt="" /></td>
    							</tr>
    
    							<tr>
    								<td valign="top" width="110"><a onmouseover="changeImages('id03bio','/images/03bio.jpg');return true" onmouseout="changeImages('id03bio','/images/bio.jpg');return true" href="bio.html"><img id="id03bio" src="/images/bio.jpg" width="110" height="35" alt="" border="0" /></a></td>
    								<td><img src="/images/spacer.gif" width="1" height="35" alt="" /></td>
    							</tr>
    							<tr>
    								<td valign="top" width="110"><a onmouseover="changeImages('id04press','/images/04press.jpg');return true" onmouseout="changeImages('id04press','/images/press.jpg');return true" href="press.html"><img id="id04press" src="/images/press.jpg" width="110" height="39" alt="" border="0" /></a></td>
    								
    							</tr>
    
    							<tr>
    
    								<td valign="top" width="88"><a onmouseover="changeImages('id05contact','/images/05contact.jpg');return true" onmouseout="changeImages('id05contact','/images/contact.jpg');return true" href="contacts.html"><img id="id05contact" src="/images/contact.jpg" width="110" height="41" alt="" border="0" /></a><img id="layout2_12" src="/images/mpanel_12.jpg" width="110" height="265" alt="" /></td>
    								<td> </td>
    							</tr>
    						</table>
    				  </td>
    				</tr>
    				<tr height="511">
    					<td rowspan="7" valign="top" width="643" height="511"><img id="mpanelmain_04" src="/images/mpanelmain_04.jpg" width="643" height="511" alt="" border="0" /></td>
    			  </tr>
    
    			</table>
    			<!-- End ImageReady Slices --></div>
    	</body>
      • 8609
      • 607 Posts
      OK, so first things first, you need to go under Elements and create a template, and in that template you will put all your html code. Then replace the part of the html that need to be dynamic with dynamic MODx tags. Where you want the content to appear, you need to place the content tag, whose syntax will vary depending on whether you’re using Evolution or Revolution:

      Evolution: [*content*]
      Revolution: [[*content]]

      Then when you create your home resource, select your new template as the template to be used by the resource, and now any content you type into the main content area should show up in the appropriate place.

      Some resources that you may find handy:
      http://rtfm.modx.com/display/revolution20/Tag+Syntax

      If using Evolution:
      http://rtfm.modx.com/display/Evo1/Template+Basics
      http://codingpad.maryspad.com/2009/03/31/building-a-website-with-modx-for-newbies-part-3-working-with-templates/
      http://bobsguides.com/porting-your-site-to-modx.html
        • 6430
        • 6 Posts
        Ahhh Thank You! I had [*content*] labeled wrong. I got it to work.
          • 30086
          • 110 Posts
          hi that happens to me as well.
          I already installed the real website to my local server but it seems my local server couldn’t find the right template.
          I checked the configuration and I changed it to the one like in my attached file
          I also change the "File Base Path" and the "File Base Browser"

          but the template seems can’t be found. What else do I need to do?
          Thanks

            • 8609
            • 607 Posts
            Quote from: tintincute at Aug 18, 2010, 02:43 AM

            hi that happens to me as well.
            I already installed the real website to my local server but it seems my local server couldn’t find the right template.
            I checked the configuration and I changed it to the one like in my attached file
            I also change the "File Base Path" and the "File Base Browser"

            but the template seems can’t be found. What else do I need to do?
            Thanks



            When you look under elements->templates, does your template show up there? If your content is showing up then it means the database migration went okay.

            One thing I always do when I move a site is to reinstall MODx in the same location using the Upgrade mode as this usually resets the file paths correctly for the new location. Note that if you don’t use upgrade mode your site will be overwritten
              • 30086
              • 110 Posts
              yes i can see my templates, what would be the next steps?
              I tried changing now the URL to this one from this link: http://localhost/wikima4/assets/templates/wikima4/css/central.css
              i’m not sure if this right.

              so, that means i have to reinstall the Modx using the upgrade mode?


              /* import core styles */
              @import url(’http://localhost/wikima4/assets/templates/wikima4/yaml/core/base.css’);


              /* import screen layout */
              @import url(’http://localhost/wikima4/assets/templates/wikima4/css/screen/basemod.css’);
              @import url(’http://localhost/wikima4/assets/templates/wikima4/css/screen/content.css’);

              /* import navigation */
              @import url(’http://localhost/wikima4/assets/templates/wikima4/css/navigation/main_nav.css’);
              @import url(’http://localhost/wikima4/assets/templates/wikima4/css/navigation/section_nav.css’);

              /* import search */
              @import url(’http://localhost/wikima4/assets/templates/wikima4/css/search/search.css’);

              /* import print layout */
              /* @import url(/css/print/print_003.css); */
                • 8609
                • 607 Posts
                OK, so you can see the templates, that’s good. Now when you open the resources (pages) for editing, is the right template assigned to each resource?

                What do your pages look like on the front end?
                  • 30086
                  • 110 Posts
                  yes if I opened the resources it is the same template.
                  But if I open the site: localhost/mysite - then I got this whole white background only and it’s like one column only.

                  The links work as well
                    • 8609
                    • 607 Posts
                    Quote from: tintincute at Aug 18, 2010, 04:17 PM

                    yes if I opened the resources it is the same template.
                    But if I open the site: localhost/mysite - then I got this whole white background only and it’s like one column only.

                    The links work as well


                    Have you viewed page source? When you view the site, right click anywhere on the page and select to view the page source. The paths to your css files may be incorrect if you used absolute paths. Is the page content showing? I assume that when you moved the site you also moved all the files?

                    Also, make sure you clear your site cache
                      • 30086
                      • 110 Posts
                      how will i know this is absolute?

                      Do I need to use the absolute path?
                      If yes, could you please give me the format?
                      Thanks