我正在使用名为Sj_news25的Joomla 2.5模板 - 请参阅此处的演示http://demo.smartaddons.com/templates/joomla17/sj-news/
我想要做的是在徽标和搜索框之间的某处创建一个模块位置,这样我就可以在那里安装一个语言切换器标记。我以前在http://docs.joomla.org/How_do_you_add_a_new_module_position%3F上使用了一个教程并且工作正常,但是这个模板使用了所谓的“Yt框架”,当我查看index.php文件时,我很难过。这里有没有人可以猜测?谢谢!
<?php
/****************************************************************************************
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Yt Framework
****************************************************************************************/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
include_once (dirname(__FILE__).DS.'includes'.DS.'yt_template.class.php');
include_once (dirname(__FILE__).DS.'includes'.DS.'frame_inc.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" <?php echo ($ytrtl == 'rtl')?'dir="rtl"':''; ?> lang="<?php echo $this->language; ?>">
<head>
<jdoc:include type="head" />
</head>
<body id="<?php echo $yt->template; ?>" class="<?php echo $yt->isHomePage()?'homepage ':'';
echo isset($_GET['option'])?$_GET['option'].' ':'';
echo isset($_GET['view'])?'view-'.$_GET['view'].' ':'';
echo $yt->getParam('sitestyle').' ';
echo $ytrtl=='rtl'?'rtl'.' ':'';
echo $yt->getParam('menustyle').' ';
echo 'fs'.$yt->getParam('fontsize'); ?>">
<div id="yt-wrapper"><div id="yt-wrapper-inner1"><div id="yt-wrapper-inner2">
<?php
// add mobile head
if( $yt->is_mobile ){
include_once (dirname(__FILE__).DS.'includes'.DS.'mobile_head.php');
}
?>
<a id="top" name="scroll-to-top"></a>
<?php
foreach($yt_render->arr_TB as $tagBD): if( $tagBD["countModules"] > 0 ){
if( ($tagBD["name"] == 'content') ){ // Block content - #content ?>
<div id="<?php echo $tagBD["id"]; ?>" class="<?php echo $yt_render->layouttype.$tagBD['class_content'];?>">
<?php
//
if($tagBD['showDivTop']=='1'){ ?>
<div class="yt-main yt-div-top-1"><div class="yt-div-top-2"><div class="yt-div-top-3"></div></div></div>
<?php } ?>
<div class="yt-main"><div class="yt-main-in1"><div class="yt-main-in2 clearfix">
<?php
$countL = $countR = $countM = $countCL1 = $countCL2 = 0;
foreach($tagBD['positions'] as $position):
if( isset($position['column']) && $position['column'] == 'yt-col1' ){
$countCL1++;
if($countCL1==1){
?>
<div id="yt-col1" style="float:left; width:<?php echo $yt_render->cinfo['w-yt-col1']; ?>;<?php echo $yt_render->cinfo['display-yt-col1']; ?>">
<?php
include (dirname(__FILE__).DS.'includes'.DS.'block-content.php');
if($tagBD['count-yt-col1']==1){
?>
</div>
<?php
}
}elseif( $countCL1==$tagBD['count-yt-col1'] && $tagBD['count-yt-col1']>1 ){
include (dirname(__FILE__).DS.'includes'.DS.'block-content.php');
?>
</div>
<?php
}else{
include (dirname(__FILE__).DS.'includes'.DS.'block-content.php');
}
}elseif( isset($position['column']) && $position['column'] == 'yt-col2' ){
$countCL2++;
if($countCL2==1){
?>
<div id="yt-col2" style="float:right; width:<?php echo $yt_render->cinfo['w-yt-col2']; ?>;<?php echo $yt_render->cinfo['display-yt-col2']; ?>">
<?php
include (dirname(__FILE__).DS.'includes'.DS.'block-content.php');
if($tagBD['count-yt-col2']==1){
?>
</div>
<?php
}
}elseif( $countCL2==$tagBD['count-yt-col2'] && $tagBD['count-yt-col2']>1 ){
include (dirname(__FILE__).DS.'includes'.DS.'block-content.php');
?>
</div>
<?php
}else{
include (dirname(__FILE__).DS.'includes'.DS.'block-content.php');
}
}else{
include (dirname(__FILE__).DS.'includes'.DS.'block-content.php');
}
endforeach; //End foreach position of block content
?>
</div></div></div>
<?php
//
if($tagBD['showDivBottom']=='1'){ ?>
<div class="yt-main yt-div-bottom-1"><div class="yt-div-bottom-2"><div class="yt-div-bottom-3"></div></div></div>
<?php } ?>
</div>
<?php
}elseif($tagBD["name"] != 'content'){ // Block is not content
?>
<div id="<?php echo $tagBD["id"]; ?>">
<div class="yt-main"><div class="yt-main-in1"><div class="yt-main-in2 clearfix">
<?php
if( !empty($tagBD["hasGroup"]) && $tagBD["hasGroup"]=="1"){ // Tag Body has group
$flag = ''; $openG = 0; $c = 0;
foreach( $tagBD['positions'] as $posFG ): $c = $c+1;
if( $posFG['group'] != "" && $posFG['group']!= $flag){
$flag = $posFG['group'];
if($openG == 0){ $openG =1;?>
<div class="group-<?php echo $flag.$tagBD['class_groupnormal'];?> clearfix" style="<?php echo isset($tagBD['width-'.$flag])?'width:'.$tagBD['width-'.$flag].'; ':'' ; ?><?php echo $float1;?>">
<?php
echo $yt->renPositionGroup($posFG);
if($c == count( $tagBD['positions']) ){echo '</div>';}
}else{
$openG = 0;
?>
</div>
<div class="group-<?php echo $flag; ?>" style="width:<?php echo $tagBD['width-'.$flag]; ?>; <?php echo $float1;?>">
<?php
echo $yt->renPositionGroup($posFG);
}
}elseif($posFG['group']!="" && $posFG['group'] == $flag){
echo $yt->renPositionGroup($posFG);
if($c == count( $tagBD['positions']) ){echo '</div>';}
}elseif($posFG['group']==""){
if($openG ==1){
$openG = 0;
echo '</div>';
}
echo $yt->renPositionGroup($posFG);
}
endforeach;
}else{ //Tag Body normal
if(isset($tagBD['positions'])){
if(isset($tagBD['autosize'])){
echo $yt->renPositionNormals($tagBD['positions'], $tagBD["countModules"], $tagBD["limited"], $tagBD['autosize']);
}else{
echo $yt->renPositionNormals($tagBD['positions'], $tagBD["countModules"], $tagBD["limited"]);
}
}
}
?>
</div></div></div>
</div>
<?php
} // end elseif($tagBD["name"] != 'content')
}
endforeach;
?>
</div></div></div>
<jdoc:include type="modules" name="debug" />
<?php
if( !$yt->is_mobile && $yt->getParam('showCpanel') ) {
include_once (dirname(__FILE__).DS.'includes'.DS.'cpanel.php');
}
?>
</body>
</html>
<?php /*}*/ ?>
答案 0 :(得分:0)
请转到文件:your_template / layouts / layout-homepage.xml(或当前布局)替换代码:
@logo 头1 通过: @商标 您现在的位置 头1 您可以在此处找到有关Yt Framework的更多信息:http://www.smartaddons.com/joomla/templates/yt-framework