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.

Is it possible to create a link that includes parameters?

July 01, 2009 11:42am

Subscribe [2]
  • #1 / Jul 01, 2009 11:42am

    Avi Frier

    59 posts

    I’m just getting the hang of Dynamic Parameters, and I pretty much have it figured out.

    One question:

    Is there any way in EE to create a hard link that implements the same parameters as the Dynamic Parameters form?

    By example, I’ll use the sample DP form from the EE docs:

    <form method="post" action="{path="template_group/template_name"}">
    
    <select name="orderby">
    <option value="date">Sort By:</option>
    <option value="date">Date</option>
    <option value="title">Title</option>
    <option value="comment_total">Most Comments</option>
    </select>
    
    <select name="sort">
    <option value="asc">Order In:</option>
    <option value="asc">Ascending</option>
    <option value="desc">Descending</option>
    </select>
    
    <select name="limit">
    <option value="10">Result Limit:</option>
    <option value="10">10</option>
    <option value="20">20</option>
    <option value="30">30</option>
    </select>
    
    <input type="submit" value="Go!" />
    
    </form>

    This is great if I want to allow the user to choose their sort preferences via a form.

    But what if I want to send them a link with these parameters pre-specified, a-la the classic PHP format, something like:

    http://my.ee.site/index.php/template/path/?orderby=Date&sort=asc&limit=10

    How can I do this?

  • #2 / Jul 01, 2009 11:50am

    Ingmar

    29245 posts

    The “EE way”, if you will, would be using url segments.

  • #3 / Jul 01, 2009 3:08pm

    Avi Frier

    59 posts

    The “EE way”, if you will, would be using url segments.

    Very cool.  Thanks!  This is awesome!

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

ExpressionEngine News!

#eecms, #events, #releases