Support Forums

Drop down to sort listings

This is a discussion on Drop down to sort listings within the Technical Support forums, part of the Technical Support Forums category; Hi all Is it possible to have a drop down to sort listings, has anybody done this or would it ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 02-06-2009, 09:24 AM   #1
Junior Member
 
Join Date: Jan 2009
Posts: 7
Rep Power: 0
chrisst1 is on a distinguished road
Default Drop down to sort listings

Hi all

Is it possible to have a drop down to sort listings, has anybody done this or would it not work?

Chris
chrisst1 is offline  
Old 02-06-2009, 09:34 AM   #2
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,951
Rep Power: 58
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Many questions such as this go unanswered, because the poster doesn't provide any information for someone to even attempt to answer the question.

What version of the software are you using?
What template are you using?
Where do you want to do this?
Why do you want to use this?
Why wouldn't you use the built in sorting feature that is in the searchlisting.tpl file?

-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 02-06-2009, 09:54 AM   #3
Junior Member
 
Join Date: Jan 2009
Posts: 7
Rep Power: 0
chrisst1 is on a distinguished road
Default

Sorry, I will remember for the future.

What version of the software are you using?
v4.0.9 Developer
What template are you using?
Default
Where do you want to do this?
showlistings.tpl
Why do you want to use this?
Because my existing site template does not have the room to show all sorting options in a row
Why wouldn't you use the built in sorting feature that is in the searchlisting.tpl file?
Can't find it, haven't got it.

Chris
chrisst1 is offline  
Old 02-06-2009, 10:01 AM   #4
curmudgeon
 
Join Date: Mar 2006
Posts: 5,237
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by chrisst1
Why do you want to use this?
Because my existing site template does not have the room to show all sorting options in a row
Why wouldn't you use the built in sorting feature that is in the searchlisting.tpl file?
Can't find it, haven't got it.

Chris
Im not sure I understand this. When you click on a category that allows ads, for example, you see a list of ads in a table. The head of the table has field names and the fields that show are are specified in the site admin.

You can click on the heading of a table to resort the table by that column. Is that not what you are talking about doing?

If its not, what do you mean by you dont have room to show all sorting options? In what manner do you hope to allow sorting?
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 02-06-2009, 10:10 AM   #5
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,467
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Maybe he means like I have done here:
ClassifiedMods Modifications

Sort Modifications By: Date Added Views Title Asc Desc
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 02-06-2009, 10:15 AM   #6
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,951
Rep Power: 58
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

My personal opinion would be that it would be much more difficult to build a feature such as this then it would be to simply modify the showlisting.tpl file to your needs.

The built in sort functionality is used if you have the showlisting.tpl selected from the administration "Search Settings" / Search Results Template "default" (The short description is "showlistings2.tpl")

Something to also bear in mind is if you are logged in as an Admin when you view showlistings on the front end of the site (not in admin), you may have more fields visible then a guest or a registered user. You can check this by going to the usergroups within the administration. This is important based off your response of, "Because my existing site template does not have the room to show all sorting options in a row"

In addition, your response of "Can't find it, haven't got it." may mean that you are using the showlistings2.tpl (see above). If not, then simply clicking on any of the column headings will sort the listings accordingly. On my site, I added text that says, "Click on a column header to sort these listings" which helps instruct end users to that functionality.

As far as editing/modifying the template itself, if you are using the showlistings.tpl file (with the sorting capability), you could simply comment out the fields that you don't want to include to shorten your table width to fit properly within your template.

Example:
HTML Code:
{if $sDisDateAdded == "Y"}
	<th scope="col"><a href="{$file}?{$querystring_dateadded}" class="sortheader">{$smarty.const.LANG_DATE_ADDED}</a> {if $sqlsort=="dateadded"}<img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/sort{$oppositesort}.gif" border="0" alt="Sort" />{/if}</th>
{/if}
To this:
HTML Code:
<!-- {if $sDisDateAdded == "Y"}
	<th scope="col"><a href="{$file}?{$querystring_dateadded}" class="sortheader">{$smarty.const.LANG_DATE_ADDED}</a> {if $sqlsort=="dateadded"}<img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/sort{$oppositesort}.gif" border="0" alt="Sort" />{/if}</th>
{/if} -->
-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 02-06-2009, 10:45 AM   #7
Junior Member
 
Join Date: Jan 2009
Posts: 7
Rep Power: 0
chrisst1 is on a distinguished road
Default

Hi
From the start, I have installed the 68classifieds script into a subdirectory of our larger existing website therefore I have had to make many changes to the to 68classifieds template files so that the overall look is maintained. A result of these changes I am looking to replace (You can click on the heading of a table to resort the table by that column) with a simple dropdown instead of clickable links.

Chris
chrisst1 is offline  
Old 02-06-2009, 11:04 AM   #8
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,713
Rep Power: 66
seymourjames is a jewel in the rough
Default

Perhaps not the place to say this but here we go.

One thing people should be aware of is that whilst sorting provides a user experience it has some intrinsic problems associated with it as far as search engines.

Largely, duplicate content can result on urls which get picked up by search engines. It is a bit technical but sorting and pagination (moving between pages of lisitings) are non-commutative operations - this means in simple terms that the order in which you carry out the same operations matters.

The bottom line is that from a search engine perspective each page should have sufficiently unique different/content. Moreover, a search engine tends not to like completely different content every time it goes to the same url either. A small piece of content changing on a page is one thing but a whole page which is different each time gives the impression of instability. It has always been a problem of dynamic sites. To this end I have tested these principles on one of my sites. Internal pages get better indexing for sure when they are unique content from others and only changing a bit with the addition of one or two new adverts pushing in. For example, my new listings pages never do as well as a category page. Hierarchy wise the category page should do worse.

Interesting subject.

This why I always implement for my sites (because SEO is critically important to my site) that new listings cannot be sorted (always first in - first out of a page by date) and that all showlistings are only ever ordered by one variable whether it be price, date or whatever (in my case price).
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline  
Old 02-06-2009, 06:06 PM   #9
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,040
Rep Power: 29
bowers01 is on a distinguished road
Default

Quote:
Originally Posted by Eric Barnes
Maybe he means like I have done here:
ClassifiedMods Modifications

Sort Modifications By: Date Added Views Title Asc Desc
Thats pretty good. Can you make it sort by price?
Also you cant see it in ie7.
Cheers
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline  
Old 02-06-2009, 07:18 PM   #10
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,713
Rep Power: 66
seymourjames is a jewel in the rough
Default

Cant see what in I.E 7 what are you referring to?
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort ICON Unregistered Pre Sales Questions 1 12-01-2008 11:18 AM
how to sort category Abdulaziz Technical Support 5 10-08-2008 03:07 PM
Sort listings by... crystal Technical Support 4 06-02-2008 03:43 PM
Sort Listings tessey Technical Support 3 03-29-2008 08:30 AM


All times are GMT -4. The time now is 09:23 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0