Customer Portal

Get Involved. Join the Conversation.

Topic

    son
    Widgets using URL parametersAnswered
    Topic posted March 5, 2009 by son Red Ribbon: 250+ Points, last edited October 29, 2011 
    1308 Views, 4 Comments
    Title:
    Widgets using URL parameters
    Content:

    Hi,

     

    I am trying to leverage the Report\Grid widget to display the 10 most popular answers on our CP's Support Home Page, however, the layout needs to be essentially 2 divs, each containing 5 answers, with the left div showing answers 1-5 and the right div showing answers 6-10.  Because of this layout, I can't simply change the perpage attribure to 10.

     

    So what I am looking to do is call the widget twice, once as is and a 2nd time adding "/page/2" to the widget path but that doesn't see, to work.  Is there a way for me to do this using the Report/Grid widget, through multiple calls or some other way?  I figured I would ask before I went and tried to create my own custom widget.

     

    Thank you,

    Son

    Bullhorn, Inc. 

    Best Comment

    Ernie Turner
    I can't think of a good way to do this without creating a custom widget, so I think that's the best option. I would just modify the view to create the two column layout and still reference the standard controller and logic files. That way you only have to reference the widget once.

    Comment

     

    • Ernie Turner
      I can't think of a good way to do this without creating a custom widget, so I think that's the best option. I would just modify the view to create the two column layout and still reference the standard controller and logic files. That way you only have to reference the widget once.
    • son

      Ernie,

       

      Thanks for the response.  I ended up creating a new view and controller page in order to support a few more attributes.  I did however use the same javascript page.  I looked at the javascript page for the Grid widget and didn't look like adding new attributes would cause any problems (I am still supporting the existing attributes).  Do you see any problems with this approach?

       

      Thank you.

    • monique perkins

      There is code in the logic file that rewrites the html of the view.  If you change the view you might need to create a new logic file that has this part of the code changed too then link to it with your view.

       

      If you are seeing strange/undesired things after performing search you will know you need to change it.

    • son
      Thanks Monique.  I will keep an eye out for it!