묻고답하기
확장변수를 권한별로 보여주려면?? (소스 수정 부탁드려요)
2014.02.11 21:44
댓글 13
-
이즈야
2014.02.11 22:33
<block loop="$extra_vars=>$key,$val" cond="$val->getValueHTML()"><!--@if(in_array($val->eid, array('record_25881', 'record_25883', 'record_25885')))--><!--@if(($val->eid == 'record_25881' && ($grant->manager || group_list[16423])) || ($val->eid == 'record_25883' && ($grant->manager || $logged_info->group_list[22962])) || ($val->eid == 'record_25885' && ($grant->manager || $logged_info->group_list[22963])))--><tr><th>{$val->getTitle()}</th><td>{$val->getValueHTML()}</td></tr><!--@end--><!--@else--><tr><th>{$val->getTitle()}</th><td>{$val->getValueHTML()}</td></tr><!--@end--></block> -
meetata
2014.02.11 22:44
헉.. 알려주신대로 수정하였는데.. 먹통이 되버리네요....
어떤 부분이 문제일까요?
-
이즈야
2014.02.11 22:59
앗 실수 ㅋㅎ
<block loop="$extra_vars=>$key,$val" cond="$val->getValueHTML()">
<!--@if(in_array($val->eid, array('record_25881', 'record_25883', 'record_25885')))-->
<!--@if(($val->eid == 'record_25881' && ($grant->manager || $logged_info->group_list[16423])) || ($val->eid == 'record_25883' && ($grant->manager || $logged_info->group_list[22962])) || ($val->eid == 'record_25885' && ($grant->manager || $logged_info->group_list[22963])))-->
<tr>
<th>{$val->getTitle()}</th>
<td>{$val->getValueHTML()}</td>
</tr>
<!--@end-->
<!--@else-->
<tr>
<th>{$val->getTitle()}</th>
<td>{$val->getValueHTML()}</td>
</tr>
<!--@end-->
</block>
-
meetata
2014.02.11 23:17
ㅠㅜ
다시 알려주신 쓰를 대입하였는데.. 먹통이 되는 현상은 해결하였으나...
<tr loop="$extra_vars=>$key,$val" cond="$val->getValueHTML() != null"><th>{$val->getTitle()}</th><td>{$val->getValueHTML()}</td></tr>위 소스 수정전과 변함이 없네요....eid 는 모둘 확장변수 추가페이지 요소 검사를 통해서 다음과 같은 소스를 보고 참조했거든요<li id="record_25881"><span class="iconMoveTo"></span><span>회원가격</span><a href="#extraDelete" class="delete modalAnchor extendFormDelete xe-modal-window" data-extra-srl="25881">삭제</a><a href="#extraDefine" class="modify modalAnchor _edit xe-modal-window" data-extra-srl="25881">수정</a></li>eid 가 문제인가요? 아니면 다른 부분이 문제일까요? ㅠㅜ -
이즈야
2014.02.11 23:24
block 안에 {$val->eid} 를 추가해서 값이 어떻게 나오는지 확인해보세요.
-
meetata
2014.02.11 23:30
알려주신대로 {$val->eid} 를 추가 했는데요.
브라우저를 새로고침했는데... 변화가 없네요...
어떻게 하죠..?
-
이즈야
2014.02.11 23:40
게시판 모듈에서 사용하시는 건가요?
-
meetata
2014.02.11 23:47
nurigo (누리고 상품 등록 모듈이에요)
소스를 여기에 긁어 드리겠습니다.. 늦은시간까지 도움주심에 진심으로 감사드려요
<load target="css/style.css" />
<load target="css/itemdetail.css" />
<load target="css/btn.css" />
<load target="../../tpl/skin.js/script.js" />
<load target="../../tpl/skin.js/scroll.js" />
<load target="../../tpl/skin.js/itemdetail.js" />
<load target="../../tpl/skin.filter/insert_comment.xml" />
<load target="../../tpl/skin.filter/insert_review.xml" />
{@$btn_color='blue'}
{@$category = $item_info->category_id}
<block cond="$module_info->colorset=='black'">
{@$btn_color='purple'}
</block>
<include target="header.html" />
<include cond="$module_info->category_display!='N'" target="categorylist.html" />
<script>
var item_price = {$discounted_price};
xe.lang.total_amount = '{$lang->total_amount}';
xe.lang.total_amount = '{$lang->total_amount}';
xe.lang.msg_input_more_than_one = '{$lang->msg_input_more_than_one}';
xe.lang.each = '{$lang->each}';
</script>
<form cond="$module_info->direct_gocart=='Y'" id="dummy_form">
<input type="hidden" id="is_mobile" value="true" />
<input type="hidden" id="ncart_mid" value="{$module_info->ncart_mid}" />
</form>
<div id="itemdetail" class="{$module_info->colorset}">
<table width="100%" colspan="0" cellspacing="0">
<tr>
<td style="vertical-align:top;">
<div class="item-thumbnail">
<img src="{$item_info->getThumbnail($module_info->thumbnail_width,$module_info->thumbnail_height,$module_info->thumbnail_type)}" />
<div class="social_block">
<!--AfterDocument()-->
</div>
</div>
</td>
<td style="padding:0 16px; width:90%; vertical-align:top;">
<div class="info-tab">
<table colspan="0" cellspacing="0" width="100%" class="ko_text">
<tr>
<th>{$lang->product_name}</th>
<td><h2 class="product_name">{$item_info->item_name}</h2></td>
</tr>
<!--@if(!$grant->manager && !$logged_info->group_list[16423] && !$logged_info->group_list[22962] && !$logged_info->group_list[22963] && !$logged_info->group_list[22964] && !$logged_info->group_list[22965] && !$logged_info->group_list[22966] && !$logged_info->group_list[22967] && !$logged_info->group_list[22968] && !$logged_info->group_list[22969])-->
<!--@else-->
<tr>
<th>ll{$lang->item_code}</th>
<td>{$item_info->item_code}</td>
</tr>
<!--@end-->
<tr>
<th>{$lang->sales_price}</th>
<td class="font_size14 product_price" style="text-decoration:line-through"|cond="$discount_amount">{$item_info->printPrice()}</td>
</tr>
<tr cond="$discount_amount">
<th>{$discount_info}</th>
<td class="product_price">- {$item_info->printPrice($discount_amount)}<span class="font_size12"> {$lang->discount}</span></td>
</tr>
<tr cond="$discount_amount">
<th>{$lang->discounted_price}</th>
<td class="font_size24 product_price">{$item_info->printPrice($discounted_price)}</td>
</tr>
<tr loop="$extra_vars=>$key,$val" cond="$val->getValueHTML() != null">
<th>{$val->getTitle()}</th>
<td>{$val->getValueHTML()} {$val->eid}</td>
</tr>
<tr cond="!count($options)">
<th>{$lang->order_quantity}</th>
<td>
<div id="item_{$item_info->item_srl}" class="num_input">
<input type="text" id="quantity_{$item_info->item_srl}" class="quantity" value="1" />
<span class="iconUp" data-for="quantity_{$item_info->item_srl}"></span><span class="iconDown" data-for="quantity_{$item_info->item_srl}"></span>
</div>
</td>
</tr>
<tr cond="count($options)">
<th>{$lang->order_options}</th>
<td>
<select id="select_options">
<option value="">{$lang->cmd_select}</option>
<option loop="$options=>$key,$val" value="{$val->option_srl}" data-title="{$val->title}" data-price="{$val->price}">{$val->title} <span cond="$val->price > 0">+</span><span cond="$val->price != 0">{nproductItem::formatMoney($val->price)}</span></option>
</select>
<div>
<table id="selected_options"></table>
</div>
<div id="total_amount">
</div>
</td>
</tr>
</table>
<div class="btn_item">
<a href="#" class="nuribtn large" onclick="direct_order({$item_info->item_srl}, '{$module_info->ncart_mid}'); return false;"><span>{$lang->cmd_direct_order}</span></a>
<a href="#" class="nuribtn light large" onclick="addItemsToCart({$item_info->item_srl}); return false;"><span>{$lang->cmd_cart}</span></a>
<a href="#" class="nuribtn light large" onclick="addItemsToFavorites({$item_info->item_srl}); return false;"><span>{$lang->cmd_favorites}</span></a>
<a href="{getUrl('act','','item_srl','','document_srl','')}" class="nuribtn light large"><span>{$lang->cmd_view_list}</span></a>
</div>
</div><!-- product info -->
</td>
</tr>
</table>
<!-- product detail -->
<div class="item-info" id="content_01">
<div class="product_title">
<ul>
<li><a href="#content_01" class="scroll on">{$lang->description}</a></li>
<li><a href="#content_02" class="scroll">{$lang->reviews}</a></li>
<li><a href="#content_03" class="scroll">{$lang->qna}</a></li>
<li><a href="#content_04" class="scroll">{$lang->cancel_delivery}</a></li>
</ul>
</div>
<div class="product_info">{$oDocument->getContent(false)}</div>
</div>
<div class="item-review" id="content_02">
<div class="product_title">
<ul>
<li><a href="#content_01" class="scroll first">{$lang->description}</a></li>
<li><a href="#content_02" class="scroll on">{$lang->reviews}</a></li>
<li><a href="#content_03" class="scroll">{$lang->qna}</a></li>
<li><a href="#content_04" class="scroll">{$lang->cancel_delivery}</a></li>
</ul>
</div>
<ul cond="count($review_list)" class="comments">
<li loop="$review_list=>$key,$review" id="review_{$review->get('review_srl')}">
<div class="authorBox">
<a href="#" onclick="return false;" class="member_{$review->get('member_srl')}">{$review->getNickName()}</a><br />
<span class="date">{$review->getRegdate("Y.m.d")}</span>
<span class="estimate">
<!--@for($i=0;$i<5;$i++)--><!--@if($i<$review->get('voted_count'))--><img src="./img/starOn_{$module_info->colorset}.gif" alt="" /><!--@else--><img src="./img/starOff_{$module_info->colorset}.gif" alt="" /><!--@end--><!--@end-->
</span>
</div>
<div class="contentBox">
{$review->getContent(false)}
</div>
<div class="nullBox"></div>
<div class="btnBox">
<!--@if($review->isGranted())-->
<a href="{getUrl('act','procNproductDeleteReview','item_srl',$item_info->item_srl,'review_srl',$review->review_srl)}" onclick="if(confirm('{$lang->confirm_delete}')) {return true;} else {return false;}" class="nuribtn light small">{$lang->cmd_delete}</a>
<!--@end-->
</div>
</li>
</ul>
<ul cond="!count($review_list)" class="comments">
<li>{$lang->msg_no_reviews}</li>
</ul>
<!--@if($is_logged)-->
<form action="./" method="post" onsubmit="return procFilter(this, insert_review)" class="commentForm" >
<input type="hidden" name="vid" value="{$vid}" />
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="item_srl" value="{$item_srl}" />
<input type="hidden" name="document_srl" value="{$item_info->document_srl}" />
<input type="hidden" name="star_point" value="" />
<div class="light_bx">
<div class="light_bx_wrp">
<table width="100%" cellspacing="0" cellpadding="0" class="view_type1">
<tr>
<td class="star_td">
<ul class="starPoint">
<li><a href="#" onclick="return false;" rel="1">1</a></li>
<li><a href="#" onclick="return false;" rel="2">2</a></li>
<li><a href="#" onclick="return false;" rel="3">3</a></li>
<li><a href="#" onclick="return false;" rel="4">4</a></li>
<li><a href="#" onclick="return false;" rel="5">5</a></li>
</ul>
</td>
<td class="advence_td">
<span cond="$config->review_bonus">{sprintf($lang->about_review_bonus,nproductItem::formatMoney($config->review_bonus))}</span>
<span cond="!$config->review_bonus">{$lang->about_review}</span>
</td>
</tr>
<tr>
<td class="center" colspan="2"><textarea name="content" class="commentArea"></textarea></td>
</tr>
<tr>
<td class="center" colspan="2">
<span><input type="submit" value="{$lang->cmd_write_review}" accesskey="s" class="nuribtn {$btn_color} medium" /></span>
</td>
</tr>
</table>
</div>
</div>
</form>
<!--@end-->
</div>
<div class="item-inquiry" id="content_03">
<div class="product_title">
<ul>
<li><a href="#content_01" class="scroll first">{$lang->description}</a></li>
<li><a href="#content_02" class="scroll">{$lang->reviews}</a></li>
<li><a href="#content_03" class="scroll on">{$lang->qna}</a></li>
<li><a href="#content_04" class="scroll">{$lang->cancel_delivery}</a></li>
</ul>
</div>
<ul cond="$oDocument->getCommentCount()" class="comments">
<li loop="$oDocument->getComments()=>$key,$comment" id="comment_{$comment->get('comment_srl')}">
<div class="indent" <!--@if($comment->get('depth'))--> style="margin-left:{($comment->get('depth'))*15}px" <!--@end-->>
<div class="authorBox">
<a href="#" onclick="return false;" class="member_{$comment->get('member_srl')}">{$comment->getNickName()}</a>
<span class="date">{$comment->getRegdate("Y.m.d")}</span>
</div>
<div class="contentBox">
{$comment->getContent(false)}
</div>
<div class="nullBox"></div>
<div class="btnBox">
<!--@if($comment->isGranted())-->
<a href="{getUrl('act','dispNproductReplyComment','comment_srl',$comment->comment_srl)}" class="nuribtn {$btn_color} small"><span>{$lang->cmd_reply}</span></a>
<a href="{getUrl('act','procNproductDeleteComment','item_srl',$item_info->item_srl,'comment_srl',$comment->comment_srl)}" onclick="if(confirm('{$lang->confirm_delete}')) {return true;} else {return false;}" class="nuribtn light small">{$lang->cmd_delete}</a>
<!--@end-->
</div>
</li>
</ul><!-- Question comment -->
<ul cond="!$oDocument->getCommentCount()" class="comments">
<li>{$lang->msg_no_questions}</li>
</ul>
<!--@if($is_logged)-->
<form action="./" method="post" onsubmit="return procFilter(this, insert_comment)" class="commentForm" >
<input type="hidden" name="vid" value="{$vid}" />
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="item_srl" value="{$item_srl}" />
<div class="light_bx">
<div class="light_bx_wrp">
<table width="100%" cellspacing="0" cellpadding="0" class="view_type1">
<tr>
<td class="advence_td">
<span>{$lang->about_qna}</span>
</td>
</tr>
<tr>
<td class="center"><textarea name="content" class="commentArea"></textarea></td>
</tr>
<tr>
<td class="center">
<span><input type="submit" class="nuribtn {$btn_color} medium" value="{$lang->cmd_ask_question}" accesskey="s" /></span>
</td>
</tr>
</table>
</div>
</div>
</form><!-- Question form -->
<!--@end-->
</div>
<div class="delivery-info" id="content_04">
<div class="product_title">
<ul>
<li><a href="#content_01" class="scroll first">{$lang->description}</a></li>
<li><a href="#content_02" class="scroll">{$lang->reviews}</a></li>
<li><a href="#content_03" class="scroll">{$lang->qna}</a></li>
<li><a href="#content_04" class="scroll on">{$lang->cancel_delivery}</a></li>
</ul>
</div>
<div cond="$module_info->display_caution == 'Y'">
{$module_info->delivery_info}
</div>
<div cond="$module_info->display_caution == 'N'">
{$item_info->delivery_info}
</div>
<div>
</div>
</div>
</div>
<include target="footer.html" />
-
이즈야
2014.02.11 23:55
eid에서 record_를 빼보세요..
-
meetata
2014.02.12 00:01
이미 해봤는데 안되더라구요... 다시 말씀하신대로 해봤습니다만.. 동일한 상황이에요..
-
이즈야
2014.02.12 00:16
리타이어 -ㅅ -;;
모르겠습니다! ㅠㅠ
-
meetata
2014.02.12 00:28
네.. 수고하셨습니다.. 감사합니다.
혹시 다른 분들 계실지... 기다려봅니다.
-
foret
2014.02.18 03:51
<block loop="$extra_vars=>$key,$val" cond="$val->getValueHTML() != null">
<!--@if($val->eid=='record_25881')-->
<!--@if($grant->manager || $logged_info->group_list[16423])-->
<tr><th>{$val->getTitle()}</th><td>{$val->getValueHTML()}</td></tr>
<!--@else-->
<!--@end-->
<!--@elseif($val->eid=='record_25883')-->
<!--@if($grant->manager || $logged_info->group_list[22962])-->
<tr><th>{$val->getTitle()}</th><td>{$val->getValueHTML()}</td></tr>
<!--@else-->
<!--@end-->
<!--@else-->
<tr><th>{$val->getTitle()}</th><td>{$val->getValueHTML()}</td></tr>
<!--@end-->
</block>해보세요. ㅎㅎ