Skip to content
General Revolution Evolution Add-ons International
Login | Register | MODX.com
MODX Open Source Content Management System, Framework, Platform and More.
Find a Partner | Hosts + SaaS | Jobs | Donate
  • RegisterSign Up with the MODX Community
  • LoginUse Your MODX.com Account
  • MODX Community Forums
  • General
  • Archive
  • Commercial Inquiries & Bounties
  •  
  • Sort ditto by float(number TV) value#

  • 19975
    331
    Sanders Design - web & graphic design services. MODx web design Cornwall (UK) based developer.

    Twitter

    SandersDesign Reply #1, 1 year, 8 months ago

    Reply
    • Link to this post#1
    I would like to have an extender added to Ditto to list resources by float(number TV) value, this would allow us to sortby price, length and year.


  • 4172
    1,614
    xdbedit - create your own CMP to edit custom-tables with TV-input-types
    MIGX (multiItemsGridTV, sortable multirecord-TV)
    formit2db with autocreate schema&classes
    formit2resource
    custom-tv-input-type for revo:imagelistTV
    quickCMP - CMP for creating simple backend-'modules' per snippets
    bloX/Xedit - Ressource-Listing and frontend-sorting/editing....

    Bruno17 Reply #2, 1 year, 8 months ago

    Reply
    • Link to this post#2
    example for numeric custom-sorting-extender:
    http://modxcms.com/forums/index.php/topic,31168.msg190188.html#msg190188


  • 19975
    331
    Sanders Design - web & graphic design services. MODx web design Cornwall (UK) based developer.

    Twitter

    SandersDesign Reply #3, 1 year, 8 months ago

    Reply
    • Link to this post#3
    Thanks Bruno17 but I'm looking to sort by price, the code only seems to work for the year and not price


  • 30023
    122

    TimGS Reply #4, 1 year, 8 months ago

    Reply
    • Link to this post#4
    Try editing the code in Bruno's link to:

    $a = (float)substr($a['pagetitle'], 9);
    $b = (float)substr($b['pagetitle'], 9);

    Then you'll have a float comparison.

    -- Tim.


  • 27749
    52

    smiley Reply #5, 1 year ago

    Reply
    • Link to this post#5
    Hi,
    I am trying to custom sort values like: 6,55 and 8,61 etc.

     [!Ditto? &parents=`[*id*]` &display=`all` &sortDir=`ASC` &tpl=`bike-gallery-spot-tpl` &hideFolders=`1` &depth=`2` &extenders=`customsort` !]


    Did the above mentioned worked? I can't get it run properly even sorting by menuindex (for texting purpouses only)





Actions

Login to Post

Other Support Options

To file a bug or make a feature request visit our issue tracker, or you can also purchase commercial support.

Love MODX?

If you build sites for a living with MODX or just love using it, why not give back?

Information

Posted in this thread:
Bruno17, SandersDesign, TimGS, smiley

 
Back to Top

MODX Global HQ

1333 N Stemmons Fwy, Ste 110
Dallas, TX 75207
United States

+1 (469) 777-MODX (6639)

The MODX Company

  • Contact
  • Media Center
  • Careers at MODX
  • Wall of Fame
  • The MODX Blog

Sponsors

SoftLayer Firehost: Secure Cloud Hosting

Stay Connected

Read our previous email newsletters.

Twitter Facebook Google+ LinkedIn github Feeds

Privacy Policy | Terms of Service | Pixels by AKTA Web Studio© 2005-2012 MODX. All rights reserved. Trademark Policy