Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TYPO3 - how to set the <base> tag in the header of generated html pages?

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.

like image 357
rob Avatar asked Feb 28 '23 23:02

rob


1 Answers

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.

like image 125
Jason A. Lefkowitz Avatar answered Apr 27 '23 16:04

Jason A. Lefkowitz