묻고답하기
언어 선택 국기 달기(위젯말고 레이아웃으로)
2010.08.14 02:41
안녕하세요? 한가지 궁금한 점이 있어서 글을 올리는데요. 언어 선택 위젯을 쓰지 않고 다른 홈페이지 레이아웃에 코드를 가져다 쓸 수 있는지 여부와 어떻게 하는 방법을 부탁드립니다. (만약에 안된다면 위젯을 써서라도 달고 싶습니다)
<!--@if($layout_info->use_slanguage == 'Y')-->
<div id="select_language">
{$lang_supported[$lang_type]}<br/>
{@ $small_key = strtolower($key)}
<!--@foreach($lang_supported as $key => $val)-->
<!--@if($key!= $lang_type)-->
<img src="./images/flag/{$small_key}.png" title="{$val}"
alt="{$val}" onclick="doChangeLangType('{$key}');return false;" />
<!--@endif-->
<!--@endif-->
</div>
위에 코드가 다른 홈페이지 레이아웃에서 가져와서 편집한 코드인데요.
어디에 두어야 우측 위젯들 과 함께 뜰지 모르겠네요.
추가설명을 하자면,
images 폴더 안에 flag 폴더를 넣었습니다. 파일명은 소문자로 되어 있구요.
클릭하면 언어를 선택할 수 있게 해줍니다.
결국 얻으려는 결과는 아래의 이미지와 같습니다.
하지만, 가능하다면 영국 국기를 지우고 그 대신에 캐나다 국기를 추가하고 싶습니다. layout 편집에 가서 이래저래 해봐도 잘
안되네요...;;
아래에 레이아웃 코드는 Blackcity 입니다.
<!--%import("css/layout.css")-->
<!--%import("css/colorset.css")-->
<!--%import("js/default.js")-->
<!--%import("lang")-->
<style type="text/css">
<!--@if($layout_info->bg_select == 'N')-->
body { background:url(./images/none.gif) {$layout_info->bg_color} }
<!--@else-->
<!--@if($layout_info->bg_img)-->
body {
background:url({$layout_info->bg_img})
center top
{$layout_info->bg_type}
<!--@if($layout_info->bg_fixed == 'Y')-->
fixed
<!--@end-->
{$layout_info->bg_color}
;
}
<!--@end-->
<!--@end-->
<!--@if($layout_info->bg_grid == 'N')-->
#bgWrap {background:none;}
<!--@end-->
<!--@if($layout_info->title_img)-->
.titleWrapper { background: url({$layout_info->title_img}) left top; }
<!--@end-->
</style>
<div id="bgWrap">
</div>
<div id="bodyWrap">
<div id="headerWrap">
<!--@if($layout_info->logo_type == 'text')-->
<h1 class="title text">
<a href="{$layout_info->home_url}">{$layout_info->site_title}</a>
</h1>
<!--@else-->
<h1 class="title">
<a href="{$layout_info->home_url}">
<!--@if($layout_info->logo_img)-->
<img src="{$layout_info->logo_img}" alt="{$layout_info->site_title}" class="iePngFix" />
<!--@else-->
<img src="./images/logo.png" alt="{$layout_info->site_title}" class="iePngFix" />
<!--@end-->
</a>
</h1>
<!--@end-->
<ul id="mainMenu">
<!--@foreach($main_menu->list as $key => $val)-->
<!--@if($val['link'])-->
<!--@if($val['selected'])-->
<li class="select">
{@ $menu_1st = $val }
<!--@else-->
<li class="off" >
<!--@end-->
<a href="{$val['href']}" <!--@if($val['open_window']=='Y')-->onclick="window.open(this.href);return false;"<!--@end-->>
{$val['link']}
</a>
</li>
<!--@endif-->
<!--@endforeach-->
</ul>
</div>
<div class="titleWrapper">
<div class="shadowLayer"></div>
<h3 class="menuTitle {$layout_info->menu_color}">
<!--@if($layout_info->sub_title)-->
{$layout_info->sub_title}
<!--@else-->
{$menu_1st['text']}
<!--@end-->
</h3>
</div>
<div class="contentWrap {$layout_info->content_color}">
<div class="leftColumn">
{$content}
</div>
<div class="rightColumn {$layout_info->content_color}">
<div id="loginNav">
<ul>
<!--@if(!$is_logged)-->
<li >
<a href="{getUrl('act','+
'+
'dispMemberLoginForm')}"><img class="iePngFix" src="./images/login.png" alt="{$lang->cmd_login}" /></a></a>
</li>
<li >
<a href="{getUrl('act','dispMemberSignUpForm')}"><img class="iePngFix" src="./images/join.png" alt="{$lang->cmd_signup}" /></a></a>
</li>
<!--@else-->
<!--@if($grant->is_admin)-->
<li>
<a href="{getUrl(','module','admin')}" onclick="window.open(this.href); return false;">
<img class="iePngFix" src="./images/setup.png" alt="{$lang->cmd_management}" />
</a>
</li>
<!--@end-->
<li>
<a href="{geturl('act','dispMemberInfo')}">
<img class="iePngFix" src="./images/info.png" alt="{$lang->userinfo}" />
</a>
</li>
<li>
<a href="{getUrl('act','dispMemberLogout')}">
<img class="iePngFix" src="./images/logout.png" alt="{$lang->logout}" />
</a>
</li>
<!--@end-->
<!--@if($layout_info->rss)-->
<li>
<a href="{$layout_info->rss}">
<img class="iePngFix" src="./images/feed.png" alt="RSS FEED" />
</a>
</li>
<!--@end-->
</ul>
<div class="clear"></div>
</div>
<div id="searchWrap">
<form action="{getUrl()}" method="post" id="isSearch">
<!--@if($vid)-->
<input type="hidden" name="vid" value="{$vid}" />
<!--@end-->
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="IS" />
<input type="hidden" name="search_target" value="title_content" />
<input name="is_keyword" type="text" class="searchText" title="keyword" />
<input type="submit" value="SEARCH" alt="{$lang->cmd_search}" class="submit" />
</form>
</div>
<div class="clear"></div>
<div class="menuWrapper">
<ul class="submenu">
<li class="top">
</li>
{@ $idx = 1 }
<!--@foreach($menu_1st['list'] as $key => $val)-->
<!--@if($val['link'])-->
<li <!--@if($val['selected'])-->class="selected"<!--@end-->>
<a href="{$val['href']}"<!--@if($val['open_window']=='Y')-->onclick="window.open(this.href);return false;"<!--@end-->>
{$val['link']}
</a>
</li>
{@$idx++}
<!--@end-->
<!--@end-->
</ul>
</div>
<h3 class="widgetTitle"></h3>
<div class="widgetWrapper"><script type="text/javascript"><!--
google_ad_client = "pub-8906163759382736";
/* 200x200, created 8/7/10 */
google_ad_slot = "5441711669";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<!--@if($layout_info->widget1_title)-->
<h3 class="widgetTitle">{$layout_info->widget1_title}</h3>
<!--@end-->
<!--@if($layout_info->widget1)-->
<div class="widgetWrapper">{$layout_info->widget1}</div>
<!--@end-->
<!--@if($layout_info->widget2_title)-->
<h3 class="widgetTitle">{$layout_info->widget2_title}</h3>
<!--@end-->
<!--@if($layout_info->widget2)-->
<div class="widgetWrapper">{$layout_info->widget2}</div>
<!--@end-->
<!--@if($layout_info->widget3_title)-->
<h3 class="widgetTitle">{$layout_info->widget3_title}</h3>
<!--@end-->
<!--@if($layout_info->widget3)-->
<div class="widgetWrapper">{$layout_info->widget3}</div>
<!--@end-->
<h3 class="widgetTitle">Clock</h3>
<div class="widgetWrapper"><img class="zbxe_widget_output" widget="DroArc_clock" skin="default" colorset="normal" /></div>
</div>
<div class="clear"></div>
</div>
<div id="bottom">
<ul id="bottomMenu">
<!--@foreach($bottom_menu->list as $key => $val)-->
<li class="slush">
|
</li>
<li>
<a href="{$val['href']}" <!--@if($val['open_window']=='Y')-->onclick="window.open(this.href);return false;"<!--@end-->>{$val['link']}</a>
</li>
<!--@endforeach-->
</ul>
<ul id="userMenu">
<li>
<a href="#">Top▲</a>
</li>
</ul>
</div>
<div id="footer">
<div class="copyright">
<!--@if($layout_info->copyright)-->
{$layout_info->copyright}
<!--@else-->
Copyright (c) 2010
<span><!--@if($layout_info->site_title)-->{$layout_info->site_title}<!--@else-->XE Factory<!--@end--></span>.
All rights reserved
<!--@end-->
</div>
<div class="credit">
skin by
<a href="http://xefactory.kr" target="_blank" class="xf">XE Factory</a>
/ powered by
<a href="http://xpressengine.com" target="_blank" class="xe">XpressEngine</a>
</div>
</div>
</div>
글이 엄청 기네요...;; (죄송) 답글 부탁드리겠습니다. 간절히...