+ Reply to Thread
Results 1 to 5 of 5

Thread: smarty code for sub category links

  1. #1
    Guru
    Join Date
    Jan 2013
    Location
    Australia
    Posts
    2,028

    smarty code for sub category links

    Is there a way i can grab some smarty code for sub categories ? and add it to a box please

    if so how would I write the smarty for a category then say for a sub category ?

    category = pets
    sub category = pets / dogs & Cats
    Attached Images Attached Images
    Getting Started or Starting Over with Your Classified Site? then Get Ready Set Fly V 4.7.1 > quietSecrets.net

  2. #2
    Hello Pete,

    DO you want to show subcategories for pets only?
    And where do you want to show subcategories? I mean what page home or may be on other pages too?
    Viktor,
    Flynax technical department,
    Best wishes.

  3. #3
    Guru
    Join Date
    Jan 2013
    Location
    Australia
    Posts
    2,028
    Quote Originally Posted by Viktor View Post
    Hello Pete,

    DO you want to show subcategories for pets only?
    And where do you want to show subcategories? I mean what page home or may be on other pages too?
    Pets was an example, it could be any category or subcategory and i want to add it to a box, / i want to crete left sided boxes not top and bottom and i do not want all of the uppercase stuff as well just like it shown on the home page but in a box that i can place on the side or anywhere I want, I can do it the slow manual way but if there was a way to add some code to a box i would rather do that.

    Thanks
    Pete
    Getting Started or Starting Over with Your Classified Site? then Get Ready Set Fly V 4.7.1 > quietSecrets.net

  4. #4
    I have a similar requirement, can anyone please share how this is done?

    Thanks
    Surya

  5. #5
    Hello all,

    I show you example on general script. I take categories from Books parent category.

    go to ftp://includes>>controllers>>common.inc.php

    find code:

    PHP Code:
    Only registered members can view the code
    and after it add new:

    PHP Code:
    Only registered members can view the code
    where 'my_new_block_key_for_categories' - it will be our new block with this key. (you ay write any like you want but block key and this key should be same)
    'getCategories(1, 'listings'); 1- it's ID for Books category you can find ID for your category in DB -> fl_categories table
    'listings' - it's category type you can see it in DB -> fl_categories table too.

    Then go to Admin Panel >> Content Boxes click add new content box button.

    Key - my_new_block_key_for_categories
    Name - like you want
    Position like you want
    Type - Smarty
    Content - {include file='blocks'|cat:$smarty.const.RL_DS|cat:'categor ies.tpl' categories=$new_custom_categories}
    Show on pages - like you want
    Enable a box style - no; because categories.tpl already exist box style.
    and click save

    then you can check it in Front end Good luck.
    Viktor,
    Flynax technical department,
    Best wishes.

+ Reply to Thread