PostNuke: A Flexible Open Source Content Management System
home | forum | international support | contact us

Support Forum

Start ::  Community ::  0.8-RC3 Feedback ::  Answer:Create a subcategory

Moderated by: Support Team

Bottom
Answer:Create a subcategory

  • Link to this postingPosted: 25.03.2008, 14:44
    Profile
    alverman
    rank:
    pnFreshman pnFreshman
    registered:
     March 2008
    Status:
    offline
    last visit:
    10.04.08
    Posts:
    34
    How to create subcategories in a category created by pninit in a my new module?
    Thanks



    edited by: alverman, Mar 25, 2008 - 02:47 PM
  • Link to this postingPosted: 25.03.2008, 16:45
    Profile Homepage
    rgasch
    rank:
    Steering Committee Steering Committee
    registered:
     January 2003
    Status:
    offline
    last visit:
    01.05.08
    Posts:
    550
    The the category manager admin, simply click on "Create a new Category" and select the appropriate category as your new category's parent category ...

    Greetings
    R
  • Link to this postingPosted: 25.03.2008, 17:39
    Profile
    alverman
    rank:
    pnFreshman pnFreshman
    registered:
     March 2008
    Status:
    offline
    last visit:
    10.04.08
    Posts:
    34
    I want to create everything from my code module.
    Even trying because my module on the new versions do not have to continue to create them manually icon_smile
  • Link to this postingPosted: 25.03.2008, 18:14
    Profile Homepage
    nestormateo
    rank:
    pnProfessional pnProfessional
    registered:
     September 2006
    Status:
    offline
    last visit:
    08.05.08
    Posts:
    913
    Check the Categories module init script.
    It creates a lot of categories by default, it may help you icon_wink

    -----
    - Mateo T. -
    Mis principios... son mis fines
  • Link to this postingPosted: 26.03.2008, 13:28
    Profile Homepage
    cyber_wolf
    rank:
    pnHelper pnHelper
    registered:
     June 2002
    Status:
    online
    Posts:
    280
    Mateo,

    I have this same question. I had already thought of looking at the category module's init file. The only problem is that the init file already knows the id and parentid fields as this is the initial filling of the database. When you add a parent category through $MyModule's init file, you don't have that parentid needed to add categories for your module. The category module also has all the path and ipath fields filled out as well.

    I think this is what alverman was talking about.



    edited by: cyber_wolf, Mar 26, 2008 - 08:30 AM

    -----
    cyber_wolf
    http://www.bkbsolutions.com - My PostNuke module development site.
  • Link to this postingPosted: 27.03.2008, 11:25
    Profile Homepage
    rgasch
    rank:
    Steering Committee Steering Committee
    registered:
     January 2003
    Status:
    offline
    last visit:
    01.05.08
    Posts:
    550
    In that case check the News and/or Quotes init script. They create new categories the IDs of which are not yet known at create time.

    Greetings
    R
  • Link to this postingPosted: 27.03.2008, 13:19
    Profile Homepage
    cyber_wolf
    rank:
    pnHelper pnHelper
    registered:
     June 2002
    Status:
    online
    Posts:
    280
    The migratecategories function of the News init script helps with this request. If I read alverman's question correctly, he wanted to include default categories in his init script when he created his module's root category in the category tree. This function in the News init script is a starting point.

    -----
    cyber_wolf
    http://www.bkbsolutions.com - My PostNuke module development site.

Start ::  Community ::  0.8-RC3 Feedback ::  Answer:Create a subcategory

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to PostNuke