ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How do I pass parameters to a method as $_POST data?

May 16, 2013 8:18am

Subscribe [1]
  • #1 / May 16, 2013 8:18am

    Wayne Smallman

    176 posts

    Hi guys, I’m trying to implement OpenSearch support, but I’m struggling.

    In the “Url” element, I’m required to send the query via a name-value pair — which would be easy enough to solve; either with a route or the .htaccess:

    <Url type="application/json"
          rel="suggestions"
          template="http://example.com/suggest?q={searchTerms}" >

    However, the method only accepts the search query as a $_POST value. Additionally, the method refers to itself to generate pagination, which would muddle the URI segment space.

    So, while I know that it’s possible to write a separate method to accept the in-bound query string, I’d need to know how I’d then make that method wrap the query up as $_POST data and then ping the search method with it.

    Or, I’ve got the whole thing wrong and some genius here knows a better way.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases