팁/튜토리얼

act로 다른 페이지 보여주기

2018.07.19 17:16
816
2

샘플 :

https://eond.com/index.php?mid=eond_dentistry

https://eond.com/index.php?mid=eond_dentistry&act=about

https://eond.com/index.php?mid=eond_dentistry&act=s1

https://eond.com/index.php?mid=eond_dentistry&act=s2

 

하나의 레이아웃에서 act에 따라서 다른 페이지를 보여주는 코드입니다.

 

<!--@if($mid==='eond_dentistry' && !$act)-->
<section class="visual_wrap">
   <img src="img/main_vis.png" alt="">
</section>
<!--@elseif($act == "about")-->
<include target="inc/about.html" />
<!--@elseif($act == "s2")-->
<include target="inc/s2.html" />
<!--@elseif($act == "s3")-->
<include target="inc/s3.html" />
<!--@elseif($act == "s4")-->
<include target="inc/s4.html" />
<!--@elseif($act == "s5")-->
<include target="inc/s5.html" />
<!--@elseif($act == "s6")-->
<include target="inc/s6.html" />
<!--@elseif($act == "s7")-->
<include target="inc/s7.html" />
<!--@elseif($act == "s8")-->
<include target="inc/s8.html" />
<!--@elseif($act == "s9")-->
<include target="inc/s9.html" />
<!--@else-->
{$content}
<!--@end-->

 

출처 : https://eond.com/index.php?mid=xe_forum&page=1&document_srl=400603

eond Lv. 12

댓글 5

  • 2018.07.20 10:22 #1023173
    오 좋네요.
    그런데 act로 하면 다른 애드온 등에 영향을 줄 수도 있지 않나요? 많은 경우 act로 애드온 작동에 조건을 주는 걸로 알고 있는데요. url의 act 파라미터는 괜찮은 건가요?
  • 2018.07.20 17:54 #1023376
    네 지정한 해당 액트일 경우에만 동작을 하는 거라서 영향을 안 받습니다.
  • 2018.07.28 04:03 #1028161
    http://herdental.co.kr/
    서브페이지를 act로 꾸민 예제 사이트입니다.
  • 2018.07.28 11:31 #1028439
    에잉, 트래픽 초과래요ㅜㅜ
  • 2018.07.20 17:57 #1023379
    말이 좀 그런데 액트가 보통 동작을 하게 하잖아요. 화면 전환이 아니라.
    그래서 애드온의 액트일 경우에는 해당 동작이 되겠지요.
    그런데 액트를 동작하기 위해서는
    애드온이 출력되는 모듈 등에 화면으로 이동해야할텐데 저건 레이아웃 안에서 서브단을 표현하는 정도라서.. 영향을 미치는 상황이 안 만들어질거 같습니다.
    만약 그런 상황이 오면 알려주세요