We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48375
    • 28 Posts
    Following from the earlier Development Site in a Subdirectory thread

    I have now removed all my previous modx installations and started afresh with installations of 2.2.14 (via the host provider control panel) and 2.2.15 (Traditional - manually installed following the basic installation instructions on the MODX website).
    Everything seems to have gone smoothly to this point and I've installed the following packages:

    • ACE
    • archivist
    • Articles
    • getpage
    • getResources
    • quip
    • taglister
    • TinyMCE
    • Wayfinder

    I've re-uploaded and reconfigured a fresh copy of the Escape Velocity template but the pages are not displaying correctly again.
    sottwell asked in the earlier thread whether or not I previously had the following code
    <base href="[[++site_url]]">
    in the page header which I did and that is the case also now:

    The installation in question is the following directory:
    http://<domainname>/_UDev_/modx2214

    The following shows how the header is configured:

    <!DOCTYPE HTML>
    <!--
    	Escape Velocity 2.5 by HTML5 UP
    	html5up.net | @n33co
    	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
    -->
    <html>
    	<head>
    		<title>Main [[++site_name]] - [[*pagetitle]]</title>
    		<base href="[[++site_url]]" />
    		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
    		<meta name="description" content="" />
    		<meta name="keywords" content="" />
    		<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,700,900" rel="stylesheet" />
    		<!--[if lte IE 8]><script src="assets/templates/escvel/js/html5shiv.js"></script><link rel="stylesheet" href="assets/templates/escvel/css/ie8.css" /><![endif]-->
    		<script src="assets/templates/escvel/js/jquery.min.js"></script>
    		<script src="assets/templates/escvel/js/jquery.dropotron.min.js"></script>
    		<script src="assets/templates/escvel/js/config.js"></script>
    		<script src="assets/templates/escvel/js/skel.min.js"></script>
    		<script src="assets/templates/escvel/js/skel-panels.min.js"></script>
    		<noscript>
    			<link rel="stylesheet" href="assets/templates/escvel/css/skel-noscript.css" />
    			<link rel="stylesheet" href="assets/templates/escvel/css/style.css" />
    			<link rel="stylesheet" href="assets/templates/escvel/css/style-desktop.css" />
    		</noscript>
    	</head>
    	<body class="homepage">
    

    When I try to display the page I get no css styling and if I remove the <noscript> tag to directly above the closing tag in the header the page displays properly but is not responsive. :?
    I note that Jesse Showalter in his MODX Implementation Part 1 - Tutorial did not have to move any code relating to the css out of the <noscript></noscript> tags, but that was probably because his MODX installation was located at the root level of his hosting space.
    I've checked that the /core/config/config.inc.php, /config.core.php, /connectors/config.php and /manager/config.core.php al1 include the correct paths, which they do.

    Questions:

    1. Can the [[++site_url]] tag be configured?
    2. If so, where in MODX can the [[++site_url]] tag be configured?

    Note: I've searched System Settings and found nothing relating to "site_url". I've also tried searching for "site" but haven't found anything that appears to relate to site_url. :?

    I would be very grateful if somone could advise where I am going wrong.

    This question has been answered by ridgedale. See the first response.

      • 48375
      • 28 Posts
      Just for the record, I have finally managed to get the template working.
      The only way I have managed to do this is as follows:

      1. All the template files had to be in the root directory.
      2. The content of the template .html files had to be copied into appropriate templates within MODX itself and the template not linked to the static template file - i.e. the Is static checkbox must NOT be ticked.
      3. When the templates had been setup, the original .html template files (in the root directory) then needed to be opened in a text editor and all the contents removed.
      4. The empty files were then saved where they were (i.e. in the root directory).
      5. That way the empty .html files therefore become just placeholders for the templates.
      6. Then the cache was cleared for the umpteenth time and before going to view the site based on the template.
      Everything then worked.

      However it now means that it is no longer possible to organise multiple templates under assests/templates to switch between, which is not ideal.

      For reference I provided the server information in an earlier post in the original thread, if that might help to understand where things might be going awry.

      I don't know where I'm going wrong but would be very grateful if someone could enlighten me.
      [ed. note: ridgedale last edited this post 9 years, 8 months ago.]
      • discuss.answer
        • 48375
        • 28 Posts
        I've finally resolved the template issue by using full URLs for all the template resources and moving the css and js directories to the root directory of the MODX installation.
        All the pages are displaying as they should except the MODX tags are not delivering their data. They are simply displaying the tag codes - i.e. [[*content]], [[++site_name]] - [[*pagetitle]], etc.

        I'll raise another topic to try to get an idea why this is happening.