Results 1 to 3 of 3

Thread: code needed for showing sub cats in a list

  1. #1
    Join Date
    Mar 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default code needed for showing sub cats in a list

    hello,

    im having trouble getting sub cats to show in a drop down list.

    HTML Code:
    <h3 class="menuheader expandable"<img src="images/d-blue.gif" style="margin-right:5px;">Test</h3>
    <ul class="categoryitems">
    {foreach from=$AllEventCategory item=arr}
    - <a href="event-ticket.php?EventCategoryID={$arr.ID}">{$arr.Name}</a><br />
    {/foreach} 
    </ul>
    i can use the above code to show a drop down of the 5 main event categories.

    as see here : www.eventtrafik.com ( in the top right box - under test).
    - Arts & Culture
    - Business & Exhibitions
    - Entertainment
    - Miscellaneous
    - Music & Party

    but, what code would i need to show the sub cats for each of these?

    if you look here : www.eventtrafik.com ( in the top right box) you can see that i have hard coded each sub cat in by typing the url and id number for each sub cat. this takes a long time.

    there must be a way to call the lists from the database ???

    thanks
    rick

  2. #2
    Join Date
    Mar 2009
    Posts
    65
    Thanks
    13
    Thanked 4 Times in 4 Posts

    Default

    This does not look like PHP to me. Are you by chance using the Smarty template engine?

  3. #3
    Join Date
    Mar 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yes.

    also, its a bit strange because the categories are arranged using drag-drop-folder-tree

    http://www.dhtmlgoodies.com/index.ht...op-folder-tree

    http://www.dhtmlgoodies.com/scripts/...lder-tree.html


    this is the structure in the database: (roughly)

    Browse: (14 Rows) event
    ID
    EventRefNo
    ProfileVisit
    OwnerID
    EventCategoryID
    EventSubCategoryID
    EventGenreID
    EventThemeID


    Browse: (55 Rows) event_category
    ID
    Name
    Position
    ParentID

    (& a few more)...

    thanks
    rick

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •