mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
레이아웃 설정시 header 스크립트를 추가할 수 있게 하여 style이나 javascript, meta태그등을 <head>와 </head>사이에 추가 가능하도록 함
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3859 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3fa8814c99
commit
a3947b1f3f
10 changed files with 43 additions and 0 deletions
|
|
@ -46,6 +46,7 @@
|
|||
unset($extra_vars->layout);
|
||||
unset($extra_vars->title);
|
||||
unset($extra_vars->apply_layout);
|
||||
unset($extra_vars->header_script);
|
||||
|
||||
$args = Context::gets('layout_srl','title');
|
||||
|
||||
|
|
@ -109,6 +110,13 @@
|
|||
$extra_vars->{$name} = $filename;
|
||||
}
|
||||
}
|
||||
|
||||
// header script를 레이아웃 모듈의 config에 저장
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
$layout_config = $oModuleModel->getModuleConfig('layout');
|
||||
$layout_config->header_script[$args->layout_srl] = Context::get('header_script');
|
||||
$output = $oModuleController->insertModuleConfig('layout',$layout_config);
|
||||
|
||||
// DB에 입력하기 위한 변수 설정
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
|
|
|
|||
|
|
@ -196,6 +196,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
// header_script
|
||||
$oModuleModel = &getModel('module');
|
||||
$layout_config = $oModuleModel->getModuleConfig('layout');
|
||||
$header_script = trim($layout_config->header_script[$layout_srl]);
|
||||
|
||||
if($header_script) $buff .= sprintf(' $layout_info->header_script = "%s"; ', str_replace('"','\\"',$header_script));
|
||||
|
||||
$buff = '<?php if(!defined("__ZBXE__")) exit(); '.$buff.' ?>';
|
||||
FileHandler::writeFile($cache_file, $buff);
|
||||
if(file_exists($cache_file)) @include($cache_file);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,13 @@
|
|||
<table cellspacing="0" class="adminTable">
|
||||
<col width="150" />
|
||||
<col width="*" />
|
||||
<tr>
|
||||
<th scope="row">{$lang->header_script}</th>
|
||||
<td class="left">
|
||||
<textarea name="header_script" class="inputTypeText">{htmlspecialchars($selected_layout->header_script)}</textarea>
|
||||
<p>{$lang->about_header_script}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->title}</th>
|
||||
<td class="left">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue