Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

How to remove a category from the category sidebar?

2»

Answers

  • Options
    ShadowdareShadowdare r_j MVP
    edited August 2013

    Here's another way to do it. Didn't know about the Result() function before. If anyone is going to copy and paste this into a file to share, make sure the spacing stays intact for legibility.

       public function Base_Render_Before($Sender) {
          // Remove Categories Set in NillaBlog from CategoriesModule
          if(isset($Sender->Assets['Panel']['CategoriesModule'])
                && (count(C('Plugins.NillaBlog.CategoryIDs')) > 0)) {
             $CategoriesModuleData = &$Sender->Assets['Panel']['CategoriesModule']->Data->Result();
             
             foreach(C('Plugins.NillaBlog.CategoryIDs') as $CategoryID)
                unset($CategoriesModuleData[$CategoryID]);
          }
       }
    

    Add Pages to Vanilla with the Basic Pages app

  • Options
    hgtonighthgtonight ∞ · New Moderator

    @Shadowdare said:
    Here's another way to do it. Didn't know about the Result() function before. If anyone is going to copy and paste this into a file to share, make sure the spacing stays intact for legibility.

    That is perfect! I am going to incorporate that into BlanderBlog :D

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.