2011-08-03 4 views
0

사이트에서 고급 검색을 구현하기 위해 노력 중이며 검색 결과 페이지의 항목에 대한 정확한 경로를 얻는 데 도움이 필요합니다.Expression Engine 검색 결과에서 정확한 입력 경로를 얻으려면 어떻게해야합니까?

{exp:search:advanced_form result_page="search/advanced_results"} 
    <fieldset class="fieldset"> 
    <legend>{lang:search_by_keyword}</legend> 
    <input type="text" class="input" maxlength="100" size="40" name="keywords" style="width:100%;" /> 
    <div class="default"> 
    <select name="search_in"> 
     <option value="titles" selected="selected">{lang:search_in_titles}</option> 
     <option value="entries" selected="selected">{lang:search_in_entries}</option> 
    </select> 
    </div> 
    <div class="default"> 
     <select name="where"> 
      <option value="exact" selected="selected">{lang:exact_phrase_match}</option> 
      <option value="any">{lang:search_any_words}</option> 
      <option value="all" >{lang:search_all_words}</option> 
      <option value="word" >{lang:search_exact_word}</option> 
     </select> 
    </div> 
</fieldset> 

<div class="defaultBold">{lang:channels}</div> 
    <select id="channel_id" name='channel_id[]' class='multiselect' size='15' multiple='multiple' onchange='changemenu(this.selectedIndex);'> 
     {channel_names} 
    </select> 

<div class="defaultBold">{lang:categories}</div> 
    <select name='cat_id[]' size='18' class='multiselect' multiple='multiple'> 
     <option value='all' selected="selected">{lang:any_category}</option> 
    </select> 

<div class='searchSubmit'> 
    <input type='submit' value='Search' class='submit' /> 
</div> 
{/exp:search:advanced_form} 
</body> 

표준 검색 결과 코드 : 내가 수정 고급 검색 양식을 사용하고

<table border="0" cellpadding="6" cellspacing="1" width="100%"> 
<tr> 
<th>{lang:title}</th> 
<th>{lang:excerpt}</th> 
<th>{lang:author}</th> 
<th>{lang:date}</th> 
<th>{lang:total_comments}</th> 
<th>{lang:recent_comments}</th> 
</tr> 

{exp:search:search_results switch="resultRowOne|resultRowTwo"} 

<tr class="{switch}"> 
<td width="30%" valign="top"><b><a href="{auto_path}">{title}</a></b></td> 
<td width="30%" valign="top">{excerpt}</td> 
<td width="10%" valign="top"><a href="{member_path='member/index'}">{author}</a></td> 
<td width="10%" valign="top">{entry_date format="%m/%d/%y"}</td> 
<td width="10%" valign="top">{comment_total}</td> 
<td width="10%" valign="top">{recent_comment_date format="%m/%d/%y"}</td> 
</tr> 

{/exp:search:search_results} 

</table> 

유일한 문제는 {auto_path}이 정확하지만 아무것도하지 않는 점이다 항목에 연결하고 기본적으로 홈 페이지를 피기 백 (piggyback)하려고합니다. 더 정확한 경로를 확보하는 방법이 있습니까? Google 검색이 할 수 있다는 것을 알고 있습니다.

감사합니다.

답변

1

관리자 → 채널 관리 → 채널 → 편집 기본 설정 → 경로 설정. 여기에 auto_path 또는 id_auto_path의 기본 URL을 입력하십시오.

그래서 입력 /뉴스/항목/가 검색 결과에 /뉴스/항목/내 - 새로운 URL 제목를 얻을 것입니다.

1

Search Results Tag의 변수는 채널 관리의 채널에 대한 검색 결과 URL 환경 설정에 의해 자동으로 결정됩니다.

당신의 제어판에서이 설정 찾을 수 있습니다 관리> 채널 관리> 채널 설정 :enter image description here

관련 문제