[TYPO3] cooluri & language detection

Freddy Tripold freddy.tripold at tlog.at
Fri Aug 22 11:55:49 CEST 2008


Frank Hüttner schrieb:
> Hi Freddy,
> 
> i have the same problem. Please can you post your configuration 
> (.htaccess, CoolUriConf.xml and CoolURI-Backend).
> 
> Regards
> Frank
> 
Hi Frank,

the .htaccess is the standard one which comes with Typo3.
Install rlmp_language_detection and cooluri, call your homepage, should 
be something like index.php?id=3&L=0 because of the language detection. 
Go to cooluri Backend --> New Link --> set Uri to the title or alias or 
whatever you have choosen f.e. home --> set Parameters to id=xy&L=0 and 
set sticky --> save.
Now set config.tx_cooluri_enable = 1, clear Cache and reload Homepage.
The second problem with language detection are all the other sites. It 
is possible to open sites through the menu, but not direct f.e. from 
google. So I activated rlmp_language_detection only for the homepage, 
because I think it make no sense, to redirect user, who comes from 
search engines.
I know this is not the best solution but it works.

br
Freddy



<?xml version="1.0" encoding="utf-8"?>
<cooluri>
   <cooluris>1</cooluris>
   <urlsuffix>.html</urlsuffix>

   <removetrailingslash>1</removetrailingslash>

   <cache>
     <usecache>1</usecache>
     <params2cool>
       <checkforchangeevery>1</checkforchangeevery>
     </params2cool>
     <cool2params>
       <translateifnotfound>0</translateifnotfound>
       <oldlinksvalidfor>365</oldlinksvalidfor>
     </cool2params>
     <cacheparams>0</cacheparams>

     <pagenotfound>
       <status>HTTP/1.0 404 Not Found</status>
       <behavior type="message"><![CDATA[ <h1>Page not found!</h1> 
]]></behavior>
     </pagenotfound>
   </cache>

   <pagepath>
     <title>tx_realurl_pathsegment,alias,subtitle,title</title>
     <saveto>id</saveto>
     <default>0</default>
     <userfunc>tx_cooluri->getPageTitle</userfunc>
     <t3conv>1</t3conv>
   </pagepath>

   <uriparts>
<part>
       <parameter>tx_ttnews[tt_news]</parameter>
       <lookindb>
         <to>SELECT title FROM tt_news WHERE (uid=$1 or l18n_parent=$1) 
AND sys_language_uid={L=0}</to>
         <t3conv>1</t3conv>
       </lookindb>
</part>
     <part>
       <parameter>tx_ttnews[pointer]</parameter>
     </part>

     <part>
       <parameter>tx_ttnews[calendarYear]</parameter>
     </part>

     <part>
       <parameter>tx_ttnews[calendarMonth]</parameter>
     </part>

     <part>
       <parameter>tx_ttnews[cat]</parameter>
     </part>
   </uriparts>

   <predefinedparts>

     <part>
       <parameter>cHash</parameter>
     </part>
     <part>
       <parameter>no_cache</parameter>
     </part>
     <part>
       <parameter>tx_ttnews[backPid]</parameter>
     </part>
     <part key="druck" regexp="1">
       <parameter>print</parameter>
     </part>
   </predefinedparts>

   <valuemaps>

     <valuemap>
       <parameter>L</parameter>
       <value key="">0</value>
       <value key="en">1</value>
     </valuemap>
   </valuemaps>

   <paramorder>
     <param>L</param>
   </paramorder>

   <partorder>
      <part>valuemaps</part>
      <part>pagepath</part>
      <part>uriparts</part>
      <part>predefinedparts</part>
   </partorder>
</cooluri>


More information about the TYPO3-english mailing list