Skip to content

Commit

Permalink
메뉴의 설명을 description으로 출력 가능하게 수정
Browse files Browse the repository at this point in the history
xpressengine/xe-core#1550 가 적용되어야 사용 가능합니다.
  • Loading branch information
YJSoft committed Jun 15, 2015
1 parent 8dc8012 commit ecf9a1b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
18 changes: 15 additions & 3 deletions seo.controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,24 @@ function triggerBeforeDisplay(&$output_content)
$is_article = false;
$is_index = ($current_module_info->module_srl == $site_module_info->module_srl) ? true : false;

$args->url = $current_module_info->mid;
$args->site_srl = $site_module_info->site_srl;
$args->is_shortcut = 'N';
$output = executeQuery('menu.getMenuItemByUrl', $args);

$piece = new stdClass;
$piece->document_title = null;
$piece->type = 'website';
$piece->url = getFullUrl('');
if($config->use_menu_desc === 'Y' && $output->data->desc!='')
{
$piece->description = htmlentities($output->data->desc);
}
else
{
$piece->description = $config->site_description;
}
$piece->title = Context::getBrowserTitle();
$piece->description = $config->site_description;
$piece->keywords = $config->site_keywords;
$piece->image = array();
$piece->author = null;
Expand Down Expand Up @@ -132,7 +144,7 @@ function triggerBeforeDisplay(&$output_content)

$this->applySEO();

if ($config->use_optimize_title == 'Y') Context::setBrowserTitle($piece->title);
if ($config->use_optimize_title === 'Y') Context::setBrowserTitle($piece->title);
}
}
/* !End of file */
/* !End of file */
7 changes: 7 additions & 0 deletions tpl/AdminSetting.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ <h1>문서 제목 최적화</h1>
<p class="x_help-block">사이트의 부제, 슬로건, 캐치프레이즈. 시작 페이지에서만 표시되며 '사이트 이름 - 사이트 부제'와 같이 표시됩니다.</p>
</div>
</div>
<div class="x_control-group">
<label for="use_menu_desc" class="x_control-label">메뉴 설명을 Meta description으로 사용</label>
<div class="x_controls">
<label><input type="checkbox" name="use_menu_desc" id="use_menu_desc" value="Y" checked="checked"|cond="$config->use_menu_desc == 'Y'" /> 문서 제목 최적화 기능 사용</label>
<p class="x_help-block">접속한 메뉴의 설명 부분을 Meta description으로 사용합니다.</p>
</div>
</div>
</section>

<section class="section">
Expand Down

0 comments on commit ecf9a1b

Please sign in to comment.