헤드와 사이드

헤드와 사이드

QA

헤드와 사이드

답변 1

본문

게시판에서 

리스트 페이지는 왼쪽 사이드를 사용하고

쓰기페이지에서는 왼쪽 사이트 없이 폭을 넓게 사용하려면 어떻게 해야 하는지요,.

 

head.top.php에는 사이드가 없고

side.php를 불러오는 방법으로 하고 있는데...

 

이 side.php 폭을 줄이니 리스트에서는 잘되는데

쓰기페이지에도 나와서 쓰기 페이지 폭을 넓게 할 수가 없어요

 

쓰기 페이지에는 side.php가 안나오게 하는 방법이 없나요?

특정게시판에서만 이렇게 하고 싶은겁니다.

 

즉 특정게시판에서 리스트페이지만 왼쪽 aside를 살리그

쓰기나 보기페이지에는 aside를 죽이고 싶다는 겁니다.

이 질문에 댓글 쓰기 :

답변 1

하단 풋터부분에 해당조건일때 스크립트를 실행시켜서 왼쪽사이드 부분을 감추시면 될꺼에요.

 

ex)


<?php if(($bo_table == "게시판아이디" && $title_msg == "글쓰기") || ($bo_table == "게시판아이디" && $title_msg == "글수정") || ($bo_table == "게시판아이디" && $wr_id)){?>
    <script>     
    $(function() {
        사이드감추기
        본문가로사이즈 넓히기
     });
     </script>
<?php }?>

 

http://125.130.145.221/bbs/board.php?bo_table=gallery


<?php if(($bo_table == "gallery" && $title_msg == "글쓰기") || ($bo_table == "gallery" && $title_msg == "글수정") || ($bo_table == "gallery" && $wr_id)){?>
    <script>     
    $(function() {
        $("#aside").hide();
        $("#container").attr("style","width:100%;");
     });
     </script>
<?php }?>

 

감사합니다~ 간단하면서도 잘됩니다..

그런데 aside를 불러온뒤에 밀어내는 방식인거 같아,,먼저 불러온 aside가 바탕에서 뭔가 후다닥 도망가는 느낌이라..ㅎ
알려주신거를 head에 넣었습니다.
<?php if(($bo_table == "shipping" && $title_msg == "글쓰기") || ($bo_table == "shipping" && $title_msg == "글수정") || ($bo_table == "shipping" && $wr_id)){?>
    <script>   
    $(function() {
        $("#aside").hide();
        $("#container").attr("style","width:99%;");
    });
    </script>
<?php }?>


<div id="wrapper">
    <div id="aside">
<?php include(G5_PATH.'/shipping_board_side.php');?>
</div>

------------------------------------------------
<?php include(G5_PATH.'/shipping_board_side.php');?>

이거를
if 목록일때는
shipping_board_side.php를 불러오고

글쓰기나 수정일때는
안불러오게 처리할 수는 없을까요?

믈론 가능합니다.

<?php
if(($bo_table == "shipping" && $title_msg == "글쓰기") || ($bo_table == "shipping" && $title_msg == "글수정") || ($bo_table == "shipping" && $wr_id)){
?>
<script>   
    $(function() {
        $("#container").attr("style","width:99%;");
    });
    </script>
<?php }else{ ?>
<div id="aside">
<?php include(G5_PATH.'/shipping_board_side.php');?>
</div>
<?php }?>

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 197
© SIRSOFT
현재 페이지 제일 처음으로