테스트 사이트 - 개발 중인 베타 버전입니다

분류정렬에 대해 질문 다시한번 드립니다 ^^ !!

· 11년 전 · 23 · 8

dongwooin.nemoweb.kr <---- 질문도메인입니다 (위에 질문도메인에 나오질 않네요 ㅠ)



안녕하세요 ~ 영카트4 이용자입니다 ~

저번주에 질문을드렸는데 아직 답변을 못받아서요 ㅠ



바쁘신줄 알지만 급하게

질문드린 내용이라 한번 더 질문을 드립니다 ~



http://dongwooin.nemoweb.kr/shop/list.php?ca_id=2010
현재 메뉴 분류를 보면 일자로 쭉 정렬이 안된채 나와있는데요 ~



http://www.smashingsports.co.kr/shop/shopbrand.html?xcode=027&type=Y

똑같진 않더라도 깔끔하게 이런식으로 정렬을 하고 싶은데



listcategory3.inc.php에서 수정을 하는건 알겠는데

해당 코드문을 봐도 전혀 모르겠어서 도움을 요청드립니다..

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 8개

분류명이 길어 한줄에 2개 씩만 노출 되도록 하였습니다.

shop/listcategory3.inc.php 를 아래와 같이 수정해 놓았으니 참고하세요.

<?
$list_mod = 2;
$td_width = 100 / $list_mod;
$str = "";
$exists = false;

$depth2_ca_id = substr($ca_id, 0, 2);

$sql = " select ca_id, ca_name from $g4[yc4_category_table]
where ca_id like '${depth2_ca_id}%'
and length(ca_id) = 4
and ca_use = '1'
order by ca_id ";
$result = sql_query($sql);
$str .= "<tr><td width=11 background='$g4[shop_img_path]/ca_bg02.gif'></td>";
$str .= "<td><table width=100% border=0><tr><td>";
$str .= "<table width=100% border=0><tr>";
for ($i=0; $row=sql_fetch_array($result); $i++) {
if ($i > 0 && $i % $list_mod == 0)
$str .= "</tr>\n\n<tr>\n";

$str .= "<td width='{$td_width}%' align=left valign=top>";
if (preg_match("/^$row[ca_id]/", $ca_id))
$span = "<span style='font-weight:bold;'>";
else
$span = "<span>";
$str .= "<a href='./list.php?ca_id=$row[ca_id]'>{$span}$row[ca_name]</span></a>";
$str .= "</td>";
$exists = true;
}
// 나머지 td 를 채운다.
if (($cnt = $i%$list_mod) != 0)
for ($k=$cnt; $k<$list_mod; $k++)
$str .= "<td>&nbsp;</td>\n";
$str .= "</tr></table>";
$str .= "</td></tr></table></td><td width=11 background='$g4[shop_img_path]/ca_bg03.gif'></td>";

if ($exists) {
echo "
<br>
<table width=98% cellpadding=0 cellspacing=0 align=center border=0>
<colgroup width=11>
<colgroup width=''>
<colgroup width=11>
<colgroup width=70>
<tr>
<td width=11><img src='$g4[shop_img_path]/ca_box01.gif'></td>
<td background='$g4[shop_img_path]/ca_bg01.gif'></td>
<td width=11><img src='$g4[shop_img_path]/ca_box02.gif'></td>
<td></td>
</tr>
$str
<tr>
<td width=11><img src='$g4[shop_img_path]/ca_box03.gif'></td>
<td background='$g4[shop_img_path]/ca_bg04.gif'></td>
<td width=11><img src='$g4[shop_img_path]/ca_box04.gif'></td>
<td></td>
</tr>
</table><br>";
}
?>
11년 전
답변 너무 감사드립니다.
그런데 3차 분류는 목록에 나오지 않는데 3차분류는 혹시 어떻해 나오는 건가요 ?
http://dongwooin.nemoweb.kr/shop/list.php?ca_id=20

shop/list.php 에서

include "$g4[shop_path]/listcategory2.inc.php";

로 수정해 보았습니다.
11년 전
그러면 기존에 수정해주신 listcategory3.inc.php의 내용은 쓸수가 없는데 같이 연동해서 쓸수 있는 방법이있나요 ?
연동은 수정하면 가능하겠지만 수정된 코드를 지원해 드리기는 어렵습니다.
11년 전
아~ 그렇군요 ^^ 그러면 listcategory3.inc.php에 3차분류만 추가 하는것도 어렵나요 ~?
네 그렇게는 표현이 안됩니다.
11년 전
넵 감사합니다 ~ ^^

게시글 목록

번호 제목
56073
56067
56065
56060
56058
56055
56051
56048
56044
56043
56042
56039
56035
56032
56030
56028
56025
56018
56012
56010