head 따로따로 적용하는 방법 채택완료
index 페이지와 특정 다른 페이지에서 서로 다른 head를 사용하고싶습니다.
예를 들어 index에서는 about us/ info/ shop 이렇게,
다른 페이지에서는 log in/ home/ cart
이런 식으로 페이지마다 헤더를 따로따로 설정하려고 합니다.
</strong></p>
<p><strong><?php</strong></p>
<p><strong>include_once('./_common.php');</strong></p>
<p> </p>
<p><strong>$g5['title'] = 'shop';</strong></p>
<p><strong>include_once('./_head.php');</strong></p>
<p><meta charset="UTF-8" /><strong>
위의 소스를 적용하면 기존 index 헤더가 나와서 만약 헤더를 추가하면 어떤 파일에 추가하고 어떤 경로를 삽입해야하나요??
감사합니다 :)
답변 1개
/index.php를 보면
<?php
include_once('./_common.php');
define('_INDEX_', true);
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if(defined('G5_THEME_PATH')) {
require_once(G5_THEME_PATH.'/index.php');
return;
}
if (G5_IS_MOBILE) {
include_once(G5_MOBILE_PATH.'/index.php');
return;
}
include_once(G5_PATH.'/head.php');
여기 head.php만 다른 파일 이름으로 바꾸면 되지 않을까요?
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
경로를 이렇게 지정하고 theme>shop>shop.head2.php 생성하니 적용 되네요 감사합니다 :)