tags:

views:

519

answers:

1

I have inherited ownership of a website running on Typo3 version 4.2.1. There are two pages that are not rendering correctly, and this seems to be down to a failure to load css and javascript files. Inspecting the page source, I can see that the <base href="blah..." /> tag is missing from the page header.

The question: how on Earth do I set the base url property in Typo3!?

I have poured over the Typo3 website, edited various "typoscript" files, offered sacrafices to the PHP gods, all to no avail. The generated code still does not include the tag.

Any help appreciated. Please note it is not possible for me to "upgrade to the latest version", and my PHP knowledge is non-existant.

+3  A: 

Adding this line to the "Setup" field of your site's main TypoScript template ought to do it:

config.baseURL = < URL here >

The "TSRef" (TypoScript Reference) is a key document for every TYPO3 site administrator -- it's available online here:

http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/current/

I recommend printing out a copy to keep at your desk, you will be referring to it frequently. (They provide it in OpenOffice format as well, to make this easy.)

Section 1.6 ("Setup") describes all the properties you can set via TypoScript's CONFIG object:

http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.3.0/view/1/6/#id2512147

P.S. While I wasn't going to recommend you download the latest version to fix this problem, I will recommend you download the latest version to be sure you haven't missed any security patches.

jalefkowit
Thanks - one question though: how can I work out which script is the main typoscript template in use? I have several script files all over the place in the website directory structure.
rob
Turns out I had updated the correct typoscript file; the missing step was to clear all caches to get the change to show up. Cheers for the answer, and the useful links.
rob
No problem, happy it worked out for you! In case it ever comes up again, TS templates have an inheritance structure based on where they are in the page tree, so typically the "master" template is on the uppermost (root) page of the site, and ones farther down are there to modify the behavior of sub-sections as necessary. (You can tell a child template to ignore its parents, but by default they inherit.) So if you set something in the root it should apply site-wide, unless specifically overridden in a child.
jalefkowit