将Typo3中的域与realurl链接

问题描述 投票:2回答:1

在我们的团队中,我们有一个包含~20个域的多语言,多域Typo3(6.2)安装。域的realurl配置正在运行。我的问题是,如果我想在域之间进行链接,我只能获得与http://www.domainA.com/?id=PAGEID的链接,而不是说网址。

页面树看起来像这样:

root
  domainA
    page1  
  domainB
    page2
  ...

现在我想要第2页到第1页的链接。

这是realurl_conf.php:

$languageMapping = array(
  'en' => '0',
  'de' => '1',
  'fr' => '2',
  ...
);
$liveDomains = array(
  "domainA.com" => "1",
  "domainA.de" => "1",
  "domainB.fr" => "2",
  ...
);

$liveDefault = array (
  'init' =>
  array (
    'enableCHashCache' => true,
    'appendMissingSlash' => 'ifNotFile,redirect[301]',
    'adminJumpToBackend' => true,
    'enableUrlDecodeCache' => true,
    'enableUrlEncodeCache' => true,
    'emptyUrlReturnValue' => '/',
  ),
  'pagePath' =>
  array (
    'type' => 'user',
    'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
    'spaceCharacter' => '-',
    'languageGetVar' => 'L',
    'rootpage_id' => '1',
  ),
  'fileName' =>
  array (
    'defaultToHTMLsuffixOnPrev' => 0,
    'acceptHTMLsuffix' => 1,
    'index' =>
    array (
      'print' =>
      array (
        'keyValues' =>
        array (
          'type' => 98,
        ),
      ),
    ),
  ),
  'preVars' =>
  array (
    0 =>
    array (
      'GETvar' => 'L',
      'valueMap' => $languageMapping,
      'noMatch' => 'bypass',
    ),
  ),
  "postVarSets" =>
  array (
    "_DEFAULT" =>
    array (
      "model" =>
      array (
        array (
          "GETvar" => "model"
        )
      ),
      "modelName" =>
      array (
        array (
          "GETvar" => "modelName"
        )
      ),
    ),
  ),
);
foreach ($liveDomains as $domain => $rootpage_id) {
  $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['www.'.$domain] = $liveDefault;
  $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['www.'.$domain]["pagePath"]["rootpage_id"] = $rootpage_id;
  $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain] = "www.".$domain;
}

在TS中config.typolinkEnableLinksAcrossDomains = 1已启用。

typo3 typoscript typo3-6.2.x realurl
1个回答
0
投票

你应该添加默认的pagePath,如:

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['pagePath']['rootpage_id'] = 1;
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = $liveDefault;
© www.soinside.com 2019 - 2024. All rights reserved.