Developing an addon to have its own page view

martianmartian New
edited June 2012 in Vanilla 2.0 - 2.8

Hello folks! I have a site deployed running Vanilla (a somewhat hacked up copy of at this point) and have been trying to be good and keep most of my changes in a custom addon opposed to hacking the base distribution. So anyway, I would like to venture in to having an addon create a custom 'page'; pardon me if my terminology is off.

Consider the addon userlist-plugin; it creates a box on the right side with a list of member accounts. I would like to try to implement something like that, but within the main content. Right now I'm hooking Base_Render_Before() to add a custom main menu link called 'People' which links to 'profile/browse' but I'm really not sure how to actually hook the request that comes in to that url or if I'm even going about this in a sane way.

Any direction would be appreciated!

Best Answer

  • peregrineperegrine MVP
    edited June 2012 Answer ✓

    it always seem like there are more answers to questions when code is presented. my mistake, I removed the comment above.

    BTW, Aolee also wrote a premium application for users on a separate page as well as a plugin. Its available for download from his site. I don't have the link but I did see one in one of these discussions.

    So you've looked at the custom page documentation and the readme, I thought it shows the route.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Answers

  • No love?

  • peregrineperegrine MVP
    edited June 2012

    edit - removed

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • martianmartian New
    edited June 2012

    I don't see where you would get #3 or #4 from. I don't have code to post because I'm asking how to go about doing something. No code has been written because it's not a matter of programming logic that I need described, it's a matter of understanding the garden framework. I'm not asking anyone to write the application; I'm asking how to hook a custom route.

    Aolee's addon does something similar to what I am trying to do, but his displays in the sidebar. I'm not interested in how the list of users is gathered and displayed; that's easy enough to figure out from many different examples. I want to know how to display information within the site, regardless of what that information may be, in the primary content view.

  • peregrineperegrine MVP
    edited June 2012 Answer ✓

    it always seem like there are more answers to questions when code is presented. my mistake, I removed the comment above.

    BTW, Aolee also wrote a premium application for users on a separate page as well as a plugin. Its available for download from his site. I don't have the link but I did see one in one of these discussions.

    So you've looked at the custom page documentation and the readme, I thought it shows the route.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • martianmartian New
    edited June 2012

    As usual, shortly after the time you start asking around about a particular topic, you discover the answer to your question!

    In my class, declaring ProfileController_Browse_Create() winds up equating to index.php?p=/profile/browse

    I now feel stupid for asking my vague question, but as I'm beginning to dive deeper into Garden development, I'm beginning to realize how scattered and sparse the documentation is. It's a little frustrating, but I suppose that's one aspect of using a semi-commercial product.

    Edit: Found his site and the addon in question: http://pinoyau.info/plugin/BrowseMember/

    I think I'll buy it, as it will certainly save me $5 of time ;)

  • good point the documentation needs an index and some search capabilities within the documentation.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.