How do I configure TYPO3 for localized websites?
config.baseURL = www.cannonbose.com
# SSL is for cannonbose.com
[globalString = _SERVER|HTTPS=on]
config.baseURL = www.cannonbose.com
[end]
config {
linkVars = L
uniqueLinkVars = L
sys_language_mode = content_fallback
sys_language_overlay = 1
sys_language_softMergeIfNotBlank = tt_content:image, tt_content:header
sys_language_uid = 0
locale_all = en_US
language = en
htmlTag_langKey = en-us
}
# French
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.locale_all = fr_FR
config.language = fr
config.htmlTag_langKey = fr
# Chinese (Simplified)
[globalVar = GP:L = 2] || [globalString = _SERVER|HTTP_HOST= *.cn]
config.sys_language_uid = 2
config.locale_all = zh_CN
config.language = cn
config.htmlTag_langKey = zh-cn
config.baseURL = www.cannonbose.cn
# Chinese (Traditional)
[globalVar = GP:L = 3] || [globalString = _SERVER|HTTP_HOST= *.tw]
config.sys_language_uid = 3
config.locale_all = zh_TW
config.language = tw
config.htmlTag_langKey = zh-tw
config.baseURL = www.cannonbose.com.tw
[end]config.renderCharset = utf-8
config.metaCharset = utf-8
$TYPO3_CONF_VARS['BE']['forceCharset'] = 'utf-8';
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['preVars'] = array(
array(
'GETvar' => 'L',
'valueMap' => array(
// 'english'
'en' => '0',
// 'french'
'fr' => '1',
// chinese simplified
'cn' => '2',
// 'chinese traditional
'tw' => '3',
),
'noMatch' => 'bypass',
),
);
TYPO3 Frontend Localization Guide
How do I preview my news articles from the backend?
Per the tt_news documentation, by using the news storage folder Page TS Config, you can set a news record to be previewed on a front-end page with a SINGLE view news content element.
If your articles preview page is to be page 37, then add the following to the news storage folder TS Config.
tx_ttnews.singlePid = 37
The 37 is determined by hovering your mouse over the page icon in the page tree and reading what number it says on via the alt or title popup as "id = 37"
That's it, a very neat and valuable trick. You could even send this link to your editor for article proof-reading.
Please note though, that the URL of news article preview is not the final article URL. Don't publish the news article preview link.
What's the easiest way to configure the RealURL extension?
Install Cannonbose's own RealURL configuration extension called cbrealurl.
Read the README.txt file for installation and configuration information.
How do I create a "Contact Us" mail form?
Name | *name=input
Email | *email=input | | EMAIL
Phone | phone=input
Subject | subject=select | Consulting, Sales, Support, Training, Web Hosting
Request | comments=textarea,25,10
| formtype_mail=submit
| Request Free Consultation
| html_enabled=hidden | 0
You can change Name, Email, and Subject of above to display as you'd like on the front-end. Don't change name, email, and subject or else the sent email from name, from email, and subject will not be what the submitter provided.
The * before name and email? denotes those fields as required.
The EMAIL of email, informs TYPO3 to validate the input as an email address prior to clicking submit.
Reference
Code from Cannonbose's Contact Us form content element for this website.
How do I stay using HTTPS?
Put the following code in your TypoScript template in Constants or Setup depending upon how you set config.baseURL in Setup.
config.baseURL = www.cannonbose.com
[globalString = _SERVER|HTTPS=on]
# SSL is for cannonbose.com
config.baseURL = https://cannonbose.com/
[end]
Reference
Code from Cannonbose's TypoScript template for this website.
Are there any TYPO3 tutorials?
TYPO3 tutorials can be found in the support section.
Can you recommend some TYPO3 documentation?
TYPO3 documentation is constantly in flux to account for development advancements. The following URLs point to most recent versions of documentation.
Hows does news and calender items differ from page content?
News and Calendar element work differently than regular page element, in that this is a 2 part system.
The news/calendar item is created and stored in the storage folder for the section.
Selecting 'save and view document' does not work for news/calendar items as they are not stored on the page on which they are displayed, but in the storage folder.
To have the item displayed in the browser you have to switch to the section page itself. The Internet Browser automatically caches (memorizes) the page it displays. So when we add new content and want to view it we have to force the browser to forget the memorized page and load it from scratch. To do this we have to clear the cache in the news/calendar storage folder before going to the page where the content will be displayed.
To clear the cache stay in the storage folder where the news/calendar item is created
go to the top of the screen in the work area (right column) and select the 'clear cache' icon
now go the page where the new/calendar item is displayed and select 'show' or 'view webpage'
Here is a link to the manual for the News Extension:
typo3.org/documentation/document-library/extension-manuals/tt_news/current/
How do you upload one or more images?
Select 'Filelist' in the TYPO3 (left) column
Expand the images folder for the section the image(s) are destined for
Select the grey icon for the folder where the image(s) have to go.
From the popup menu select 'Upload Files'
If more than one image needs to be uploaded select the down arrow next to 1 file box and choose the number.
If you are replacing an existing file select 'overwrite existing files'
Select the 'Browse' button for the first box, you are now on your computer's harddrive.
Go to the place where the image is stored and
select it, the image's name will now appear in the box.
Repeat for the other images, then
select the 'Upload Files' button.
How do you choose what image format to use?
Photos are generally saved in JPG format
Icons are generally saved in GIF or PNG format
Photos that come straight off a digital camera are way to big for the Internet both in actual dimensions and in size and have to be resampled. Example a 1MB image can be reduced to 50K, which will load much faster, especially for people with dial up service and it will take up less room on their computer's harddrive.
Selecting the Text w/image option will automatically resize the image to a more managable size. The image is automatically resized to 295 pixels wide. If this is too big, the image can be made smaller by writing the size in the width or height box.
Ignore the 'Quality' and 'Effects' boxes
When selecting an intext picture inside the RTE (Rich Text Editor) it is important to choose 'New Magic Image' rather than 'New Plain Image' at the top of the popup window and then select the image. This way the image will automatically be reduced.
How do you create print or share article popups?
lib.print_url = TEXT
lib.print_url {
value = Print
typolink {
parameter = 261 640x480:status=1,menubar=1,scrollbars=1,resizable=1,location=1 - Print Story
addQueryString = 1
addQueryString {
method = GET
}
additionalParams = &print=1
}
}
lib.tip_url = TEXT
lib.tip_url {
value = Email
typolink {
parameter = 210 1000x600:status=1,menubar=1,scrollbars=1,resizable=1,location=1 - Email Story
addQueryString = 0
addQueryString {
method = GET
}
additionalParams.cObject = COA
additionalParams.cObject {
# This part generates the "tipUrl" parameter in the
# correct format. (rawUrlEncoded)
10 = COA
10 {
# This part adds the domain (baseUrl) to the link URL
10 = TEXT
10.data = TSFE:baseUrl
# This part creates an URL pointing to the current page
# including all parameters from the query string.
20 = TEXT
20.typolink.parameter.data = page:uid
20.typolink.addQueryString = 1
20.typolink.addQueryString.exclude = id
20.typolink.addQueryString.method = GET
20.typolink.returnLast = url
# Then everything is rawUrlEncoded so it can
# be placed as a single parameter in the link URL
stdWrap.rawUrlEncode = 1
}
# And finally the parameter data is wrapped with the "&tipUrl=" parameter.
wrap = &tipUrl=|
}
}
}
### articleLinks
temp.articleLinks = COA
temp.articleLinks {
### Printlink
10 < lib.print_url
20 = HTML
20.value =
60 < .20
70 < lib.tip_url
80 < .20
}
lib.printLinks < temp.articleLinks
Cannonbose is an official TYPO3 consultant providing on-call TYPO3 support and on-going TYPO3 website maintenance. We specialize in the development and support of TYPO3 CMS (content management system) websites. Whether you need TYPO3 development, TYPO3 performance tuning, TYPO3 SEO (search engine optimization), TYPO3 support, or TYPO3 training; we have a TYPO3 support agreement to fit your needs. Cannonbose contributes to TYPO3 by supporting TYPO3 marketing and being a corporate member of the TYPO3 Association.