I just need to add the default panel to the custom page*

edited October 2011 in Vanilla 2.0 - 2.8
I just need to add the default panel to the custom page. Can anyone help please ?
«1

Answers

  • I need an answer as well. How can I get categories for a side panel within custom pages?

  • Would appreciate an assist with this too, please.
    And thank you.

  • AfaIk in the default.master.php it is this line that calls it :

    <div id="Panel"><?php $this->RenderAsset('Panel'); ?></div>

    So I guess that, or some version of it, might do the trick.

  • @whu606 no.. its not working :(

  • did you try AddModule function?

    $Sender->AddModule('SignInModule');
    $Sender->AddModule('GuestModule'); ?????

  • @sahotataran steps please

  • just use it anywhere in your custom page. will add that module to the page. if it works. cant try it right now. can try it tomorrow if u can wait till then :D

  • hbfhbf MVP
    edited January 2012

    i just ran a test... it works

    $this->AddModule('CategoriesModule');

    will cause the Categories list to display on a custom page in the panel.

    @Chanux if you want custom content in the panel, you will have to write a custom plugin as a module. Look at other plugins that create modules for guidelines.

    test page

  • please give me the code that insert to the custom page

  • the code is

    $this->AddModule('CategoriesModule');

  • Where do I put this code in the custom page? The only php I have on that page is:
    <?php if (!defined('APPLICATION')) exit(); ?>

    Do I put it here: <?php if (!defined('APPLICATION')) exit(); $this->AddModule('CategoriesModule'); ?>

    I tried that and I got bonked.

  • i use

    $this->AddModule('CategoriesModule');
    $this->AddModule('SignedInModule');

    and works for me

  • AoleeAolee ✭✭
    edited January 2012

    doest work for me,

    getting this error

    Could not find a categories view for the CategoriesModule module in the dashboard application.
    The error occurred on or near: C:\wamp\www\pinoyau.info\library\core\class.module.php

    so i had to tap on the code and add below in library/core/class.module.php line 170

    $ViewPaths[] = CombinePaths(array(PATH_APPLICATIONS, 'vanilla', 'views', 'modules', $View . '.php'));

    tried assigning the path to method FetchViewLocation but still doesnt work, the FetchViewLocation method being called is from class class.controller.php not from the class.module.php.

  • interesting. i just ran the most basic test i could think of and it works.

    <?php if (!defined('APPLICATION')) exit(); ?>
    <?php
    
    $this->AddModule('CategoriesModule');
    
    ?>

    here is the page in action.

    http://homebrewforums.net/plugin/page/blankcat

  • AoleeAolee ✭✭
    edited January 2012

    @hbf did the same thing, could there be conflicting plugin on my end?

  • @aolee im not sure what could create a conflict. do you have debugging turned on for your site? want to post a link?

  • the only immediate thing i can say is, my test is being run on an apache, not wamp server... don't know if that has anything to do with it.

  • @hbf nope have debug turned off, no other error even if it's turned on. unless i add the $this->AddModule('CategoriesModule'); getting the said error above.

    yes mine also sits on a linux box (LAMP).

    Many thanks hbf, I really appreciate your effort helping us with this kind of matter :)

  • if you're on a Linux LAMP server this line from your error message is perplexing

    The error occurred on or near: C:\wamp\www\pinoyau.info\library\core\class.module.php

    That looks like a windows WAMP install path to me.

  • Aolee said:
    Many thanks hbf, I really appreciate your effort helping us with this kind of matter :)

    and, you're welcome of course. I'm just learning the framework myself so I don't have a ton of answers, but I like to try where I can. I'm finding that this framework is pretty easy to work with.

Sign In or Register to comment.