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.

Getting Categories Controller to use it's own discussions.php view

JongosJongos
edited January 2012 in Vanilla 2.0 - 2.8

I'm trying to make a plugin that shows subcategories on top of discussions in Categories page... (http://domain/categories/category-name/)

I found out that CategoriesController::Index() is not using discussions.php that is in it's own view folder. But insted it's using the one in /applications/vanilla/views/discussions/discussions.php

Please refer to image below :

imageshack.us/photo/my-images/818/68596514.png/

It seems like this is intentional... (look at class.categoriescontroller.php line:141)

I tried changing some lines (in class.categoriescontroller.php and /applications/vanilla/views/categories/discussions.php) but i keep getting the Bonk page.

  1. I want to know why?

  2. How to force it to use it's own view?

  3. How to override a view in your plugin? (leaving original files untouched)

Best Answer

  • JongosJongos
    Answer ✓

    Nevermind...

    It doesn't have it's own view.

    That /views/categories/discussions.php is for Categories::Discussions( ), not Categories::Index( )

Answers

  • JongosJongos
    Answer ✓

    Nevermind...

    It doesn't have it's own view.

    That /views/categories/discussions.php is for Categories::Discussions( ), not Categories::Index( )

Sign In or Register to comment.