Ask a Question related to ASP Database, Design and Development.
-
James #1
Side bar category that opens up when clicked
I'm trying to develop a suitable navigation structure for
my website, but I've gotten stumped trying to develop the
navigation. I would like a side bar that list the
categories then once a user clicks a category then it
opens the pages within the category. Here is a link to
what I want to accomplish.
[url]http://demo.acuitycms.com/[/url]
When you click on products and services, it opens up the
products and services.
My database schema:
category
catid int identity
catTitle varchar(50)
page
pageID INT identity
catID int references category(catID)
pageTitle varchar(50)
pageBody text
Thanks and any insight would be appreciated.
James Guest
-
Many-to-Many with Sub Category
I have two linking tables, one for my main categories and one for sub categories with the many-to-many insert wizard applied to each. Works great on... -
Verity and Category
I have a problem using category with Verity. My search form allows people to search in a collection of laws combining full-text searching and... -
Controls with a client side onLoad function or seting a cursor server side
Is there any way to create a web control that calls a client side onLoad function? Its diffucilt since you are not able to access the form or... -
[PHP] Category and sub-category logic
Ryan A <mailto:ryan@jumac.com> on Thursday, August 14, 2003 3:21 PM said: Read this http://www.sitepoint.com/article/1105 and you will know what... -
Category and sub-category logic
Hi, I am thinking of making a program for personal use which does a very simple thing, just displays listings under categories, eg: under main... -
James #2
Side bar category that opens up when clicked
OK, I think I figured it out. Can this code be
optimized. What I am doing is checking if the categoryID
from the request("categoryID") is <> "" then If it is I
then run the code to display the pages within that
category. Is there a better way to so I won't have to
check, seems like I could use a join or something. Any
insight let me know.
************ code start ********************
<div id="links">
<%
CategoryID = trim(request("categoryID"))
%>
<ul>
<%
' gets the links for the menu
sql = "select catID, catTitle from category order by
catID"
set rs = Conn.execute(sql)
do while not rs.eof %>
<li>
<a href="template.asp?CategoryID=<%=rs("CatID")%>"><% =rs
("catTitle")%></a>
</li>
<%
if cint(rs("catID")) = cint(categoryID) then
sql2 = "select catID, conID, pageTitle from content where
catID = " & CategoryID & " order by catID"
set rs2 = ADODBConn.execute(sql2)
do while not rs2.eof %>
<li class="test">
<a href="template.asp?CategoryID=<%=rs2
("CatID")%>"> <%=r s2
("catTitle")%></a>
</li><%
rs2.movenext
loop
end if
%>
<%
rs.movenext
loop
%>
</ul>
</div>
************ code end ********************>-----Original Message-----
>I'm trying to develop a suitable navigation structure for
>my website, but I've gotten stumped trying to develop the
>navigation. I would like a side bar that list the
>categories then once a user clicks a category then it
>opens the pages within the category. Here is a link to
>what I want to accomplish.
>
>[url]http://demo.acuitycms.com/[/url]
>
>When you click on products and services, it opens up the
>products and services.
>
>My database schema:
>
>category
>catid int identity
>catTitle varchar(50)
>
>page
>pageID INT identity
>catID int references category(catID)
>pageTitle varchar(50)
>pageBody text
>
>Thanks and any insight would be appreciated.
>
>
>.
>James Guest



Reply With Quote

