Liquid sorting web app list items

FIltering is great in Liquid, but sorting the data by custom fields is something which our clients are really asking for.
Trying to say to a client, you can only sort alphabetically etc. is really making BC seem really unfriendly. Please, please, please can this be added or someone show me how this can be achieved without writing hundreds of lines of JavaScript for something which is so rudimentary in other languages / programming systems.

Hope I understand the question correctly.
Are you trying to allow the customer to set the sort order? And/or allow the customer to categories web app items into groups? Or simply, sort the data by a particular custom field, such a category?
Here's a simply solution I've got working: FAQs grouped into categories. I took this one step further and allowed my customers to even edit their categories, but you can hard code this per site if you like.
1) Collect the web app data into collections, so we can sort by custom fields.
{module_webapps render="collection" id="FAQs - Questions" filter="all" hideEmptyMessage="false" sortType="ALPHABETICAL" collection="faqsQuestions" template=""}
{module_webapps render="collection" id="FAQs - Categories" filter="all" hideEmptyMessage="false" sortType="ALPHABETICAL" collection="faqsCategories" template=""}
2) If you want to list all the categories or your custom fields (which are editable by the client in my case):
{% if faqsCategories.items -%}
        <ul class="faq-categories">
{% for category in faqsCategories.items  -%}
            <li><a href="#{{category.name | replace: ' ','-'}}">{{category.name}}</a></li>
{% endfor -%}
        </ul>
{% endif -%}
3) Now display your web app data sorted by custom field type:
{% if faqsCategories.items -%}
{% for category in faqsCategories.items  -%}
            <h2>{{category.name}}</h2>
            <ul id="{{category.name | replace: ' ','-'}}" class="accordion">
{% for question in faqsQuestions.items  -%}
{% if question.Category_id == category.itemID -%}
                <li>
                    <a href="#panel{{question.itemID}}">{{question.name}}</a>
                    <div id="panel{{question.itemID}}" class="content">
{{question.description}}
                    </div>
                </li>
{% endif -%}
{% endfor -%}
            </ul>
{% endfor -%}
{% endif -%}
The above demonstrates how you can sort web app data by a custom field type.
IMO I don't think this is something BC should be expected to produce (but I could be persuaded )
Hope this helps and I hope I did not go on a tangent.
Cheers,
Stepehn

Similar Messages

  • Web App List rendering in a table

    I have three webapps listing on this site: http://browncommunicationsgroup.businesscatalyst.com/. The top slider, The area under "The Work" and in a modal window that opens when  the view opprtunities link is clicked. The web app list in the "The Work" is rendering out in a table but the other two aren't. I'm not sure why. Does anyone know of a setting oe what I can do to get rid of these tables?

    Hi Scott,
    Liam is absolutely right, if you define any number for 'items per row' in the module_webapps tag BC renders the webapp list as a table. Once the number is removed BC will render whatever you have setup in your webapp list template. Hopefully this will be updated in the BC documentation soon as it is not clear that tables are used here by default.
    Had a look at the demo site link, love the design.
    Cheers
    Ken

  • Filter Web App List

    Is there a way to filter a result list from a web app? 
    I thought this would be a fairly common request, but can't find any details how to do it other that filter by the set 'Random' 'Latest' etc...  I want to be able to filter a web app list -  For example I may have 40 cats and dogs in the web app - I want to filter to show just the cats in the list.... I have a field in the web app that sets if the item is a dog or cat....???
    Any help greatly appreciated.

    Hi Duncan,  I think what you have done will help, but I can't seem to get it to work.
    I've setup a category app with data source to itself(?) and also the product app (one I had before but added category data source called 'category breed' linking to the new catory app). It is the part where I get it to pull in the matching products from the products app that have been set to the same cateogry... bit confused how to do this, or how you done it??  Any chance you could be give a few more details. 
    Do I have to 'classify' products to get this to work - or just select the category in the dropdown list?

  • Wish list request-  {tag_classifications} in Web apps list layout

    To be able to use the {tag_classifications} in the Web app list layout, list would allow for advanced filtering i nthe list layout.    

    Agreed!! Why this wasn't done when they added {tag_itemID} etc. is beyond me! This can be used for so many resources.

  • Module web app list tags - how to start a list to not include the first one?

    Hi
    I have two panels displaying a web app list and want them to follow on from each other, so panel one displays the first one {module_webapps,24027,l,,,,false,1,false,1} and then the second panel displays the 2nd and 3rd.
    How would I go about it?
    Thanks
    J-P

    Hello
    Hope the below helps
    http://prasantabarik.wordpress.com/2013/09/26/pass-querystring-value-from-sharepoint-page-to-app-partclient-web-part/
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • How to sort web app items based on few fields of it on search result page?

    I have a web app and its search. The search results are on multiple pages means it has pagination. My client's requirement is to have a feature which will sort results based on some web app items. for example we have a field price so when user select the price it needs to sort from high to low. Any one have idea how to do it?

    I have just been playing around with this for something else, all you need to do is duplicate your price field into the weighting field and it will automatically sort from High to low for you.
    Cheers
    Duncan

  • Web Apps using Item Description in Google Maps Mouseover

    Does anyone know if there is a way to use alternative fields from the web app to display in the pop up on the google map when you are plotting web app items on a google map from the list view? I seem to be only getting the option to display the address (which comes from the standard address fields) and the Item Description. I want to use alternative fields (ie a summary field) as the Item Description copy is too long.
    This is the pop up I mean. The top line is the Item Name, the address is coming from the standard item address fields, and then the view property link is what we have placed in the description field. We would like to change what we use the item description field for and therefore use another field for this map.

    See this topic http://forums.adobe.com/message/4712217. It answers that question.

  • How to create a web app list which is divided by months

    Hi,
    I'm trying to create a list of calendar events similar to the one on this site 2015 Event Schedule - g20.org but not as complicated, as I don't need any animation, just to list but have the months as section headers.
    I presume I can start of by creating a web app with the bespoke fields that I need, and it can be weighted by the date that I set within the app? The only thing that I'm not quite working out is how to get the months to display, would it be a matter of creating classifications for the months? That sounds as if it may become to over complicated.
    Thanks
    J-P

    Thanks Liam - I just checked out the Blog, for anyone else interested - http://www.businesscatalyst.com/_blog/BC_Blog/post/January_2013_System_Update_-_Fresh_UI_i mprovements,_Web_App_enhancements_and_more/
    "Render Web App items inside a sub-folder, such as /folder/subfolder/webapp-name. For example, you could have /blog/authors/bogdan (where Bogdan is the Web App item name)"

  • Show different content after every 5th web app listing

    I have a web app that list products. I would like to show different content after 5th item from the web app.
    So, it might look something like this.
    <div class="wrapper article-single-wrapper">
    Web app product 1
    Web app product 2
    Web app product 3
    Web app product 4
    Web app product 5
    </div>
    <div class="wrapper sponsored-post-list-wrapper">
    Advert
    </div>
    <div class="wrapper article-single-wrapper">
    Web app product 6
    Web app product 7
    Web app product 8
    Web app product 9
    Web app product 10
    </div>

    You can only do that with javascript, Say you had a hidden contentholder with the add on it. You could use jQuery for example, store the .html() into a variable and then every nth-item (4th) you could .insertAfter()

  • Dashcode Web Application list items

    In the code generated by Dashcode, it says "Sample data for the content of the list. Your application may also fetch this data remotely via XMLHttpRequest." I'd like to keep my lists in external files so the user doesn't have to load data they may not be interested in. I've put the XHR in the listControler function, but obviously I'm missing something. Has anyone seen an example of how this can be accomplished?

    Unfortunately by central admin UI you cannot change a web application name.
    So there are two ways to do this
    First as suggested above you have to delete web app and recreate again.
    2nd one you can use powershell script to modify webapp name as below
    $a=Get-SPWebApplication | where {$_.Name -match "Old web app name"}
    $a.Name
    $a.Name="New web app name"
    $a.Update()
    Get-SPWebApplication | where {$_.Name -match "New web app name"}
    Hope that's helps you.
    Regards
    Soni K

  • Can you update a web app's weighting field automatically??

    I'm having a real hard time understanding why we have the power in BC to build web apps but can't sort data the way we want through automation... I realize at this point, the only way to sort my items by date is to manipulate the weighting field. However, I’m building a user driven site with all user submitted content and it needs to be available immediately. Now, obviously results are posted online as soon as they are submitted but as of now, the only automatic way to display results that makes any sense is by a Recent Activity listing or Alphabetical. 
    Is there any way to automate updating an item's weighting field so that results can be available in order of, for example, Event Date (custom date field)?????
    HELP PLEASE - all this power sure seems like a waste if you can't manipulate your results accordingly!!

    Ok- two things--
    1.  You are missing a "(" at the beginning of your function-- you currently have:
    function($){
        var container = $(".sort-list");
        var items = $(".sort-item");
        items.sort(function(a,b){
            return new Date($(a).attr("data-event-date")) < new Date($(b).attr("data-event-date"));
        }).each(function(){
            container.prepend(this);
    })(jQuery);
    But you need a beginning parenthesis before the "function":
    (function($){
        var container = $(".sort-list");
        var items = $(".sort-item");
        items.sort(function(a,b){
            return new Date($(a).attr("data-event-date")) < new Date($(b).attr("data-event-date"));
        }).each(function(){
            container.prepend(this);
    })(jQuery);
    2.  Move the whole script in your page to after the "ul.sort-list" element.  Right now you have the javascript in the page before the UL element that holds your web app items, so the browser will read that javascript first and since it hasn't read the web app item list inside the UL element then it won't work, so move it to after the closing </ul> of your web app list.
    You should be all set if you fix those two issues. Good luck!

  • FTP upload on a web App

    Hi people, I am creating a web application which on one part need the user to upload an image. Rigth now iam testin the site on a free web host and so it just let me upload files using FTP, the problem is that i cant find the way to upload the image, i already know how to upload files to FTP with flex but that was using the "File" class which you can only use on an AIR application, how could i achieve the same result from a web application?
    Thanks

    Not too sure about pagination and filtering/sorting.  You might have to hack that together with some javascript and/or ajax.
    Here's my advice on the last two...
    The owner of their record in the web app needs to be able to edit only their own listing.
    This is the default functionality of customer submitted web app items in a secure zone.  They can only edit their own web app items.  Make sure the {tag_edit} tag is included in your web app item list view and if that list view is rendered in the Secure Zone while the user is logged in, the owner of that web app item will see the EDIT link to edit their web app item.
    but can only be shown if that user selects the radio button field to allow us to publish their email address.
    While I advise against showing an email address in plain text on the web, if you are ONLY including this web app in a secure zone then this could be ok.  Having a plain text email address in publick html markup is a no-no.  Spambots will grab it and start spamming you.
    But if you do intend to do this only in the secure zone and the logged in users are trusted you can probably just:
    Include a field name in your web app form called "showemail" and use the checkbox data type.
    Include a blank field that you hide in your form called "owneremail" and use the string datatypeHide it like so by manually editing the form markup: <input type="hidden" id="owneremail" name="CAT...." />
    Use some javascript so that when someone sets the checkbox for "show email address" it fills in this hidden field.  If the form is in a securezone you can just use {module_emailaddress} in your actual javascript code on that page to output the user's email address and fill the #owneremail input with that value.
    Someone else might have more information about pagination.  I forget if pagination is built into web app lists.

  • How can I add a Last Update to a web page with a web app.

    I would like to know how to update a webpage whenever a web app item has been added or updated last.
    I have the tag {tag_lastupdatedate}  but it only works is only for the web app list or details page.
    I want to be able to add the date and time as to when the entire list was last updated. Any suggestions? thanks!

    Hi DLSAgency,
    There is a module called {module_lastupdated} and it will display the date when the web page it's on has been last updated, but there is no module that will display when the web app list inside that page was last updated. There no such functionality in BC.
    Cheers,
    Mario

  • BC webMarketing plan and web apps

    I've just built a site in BC using web apps. The site was paid foryesterday, went for the webMarketing plan, and now access to the web apps have dissappeared. I thought I had the right plan as, on this page, http://www.businesscatalyst.com/pricing/monthly when hovering over the listed item "Built-In-Modules" it states that web apps are available to take your site to the next level. However, having done some further investigation into why I no longer have access I came across this page http://helpx.adobe.com/business-catalyst/kb/detailed-plan-breakdown.html and that lists them as only being available in the webCommerce plan.
    This is all pretty annoying as conflicting information has been provided, and the hosting plan is going to cost double what I originally thought. Am I right in thinking I have been mislead here, or have I mis interpreted something?
    Grant

    Hi Grant,
    Web apps and modules are seperate entities. It does not say web apps but modules.
    You can clearly see in the webCommerce you have Custom web apps listed there.
    The tooltip though is wrong, that does read incorectly and I have reached out to the website team to change that.
    Wont be intended, it is a new site for them that went live before xmas and being in the industry we all know we spend a bit of time making a tweaks, fixes and changes for a bit of time after.
    I am sure they will be very grateful for the good spot from yourself on this

  • How to add a custom web apps root page?

    I saw in Jan 2013 System Update the following:
    "Render a custom page when accessing the root URL of a Web App. For example, if you have a “blog” Web App, the items can be made accessible at  /blog/my-blog-post, and you’ll have the ability to customize the /blog page"
    Could someone point me in the correct direction for instructions on how to make use of this feature. 
    Couldn't appear to find a link from the Blog release notes to anything, and also tried trawling through support and forums for a suitable post.
    Closest I found was one about using sub-folders for web app items.
    I've tried adding a page in website admin, with the same URL as the web app, but it simply throws an error as it clashes with Web App url.
    Cheers
    Mike

    Hi Mike.
    Because a folder can have a index.html Web apps in the past you could not access that ability. You had to make a page and you could not SEO call it the same as your web app.
    SO
    Your web app is called Blog.
    You can now make a folder in your root called Blog.
    In that folder you can create a page and give it a url of index.html
    Now when you access the a web app directly - www.yoursite.com/yourwebapp or www.yoursite.com/yourwebapp/index/html you will access that index page.
    You can also put other pages under that folder if you want too.

Maybe you are looking for