Search

Alistair:

When I used your code to check what was getting output.. it seems the sort was governed by the page/pagination: see below for output of what I saw:

order: "desc' limit :"6' sort :"' start page :"1' Array ( [149] => yes [84] => equal to or earlier than 2009-11-17 [85] => equal to or later than 2009-11-17 )

This might be cause I’m using the grab GET bit you suggested so It’s printing what it hasn’t come accross yet maybe… as in the grab GET $s . ‘salary-from’ is declared after the print out above it..

Edit: after noticing the code above I see that sort :”’ is not looking at the pagination but just has no value.. possibly cos it’s got NULL as it’s value.

This is silly now.. whatever I try results in no entries under jobs/full-time but results under /jobs/ could it be a relative url issue? It’s definitely something to do with the system:id being required in order to have entries appear in both parameter outputs.. i.e /jobs/ and /jobs/full-time/ whenever system:id is changed to anything else.. I get no output of entires from the job-table datasource under the /jobs/full-time/ parameter.

Having tried the nickdunn and Alistair solution, neither is outputting any entires when I use the url www.domain.co.uk/jobs/full-time/

The /full-time/ url is a parameter and not an actual page.

I wonder if the fact that /full-time/ is parameter is causing the error/lack of entires from the datasource any suggestions what to try next?

All I need is a way to filter the $hours by part-time and full-time from a link and have the page display only those jobs that have full-time or part-time in the $hours field…

Without seeing the site and data, it’s too difficult figure out whats going on. If you like, I can take a closer look. But, You’ll need to give me access to the site.

Would love to have someone look under the hood.. it is live though so concious of not changing anything until late at night when no one is online.. that’s what I usually do anyway.

How do we do this i.e get in touch?

My {$hours} parameter seems to conflict with any other parameter I set in dsParamSORT bar system:id or system:date

nickdunn, have sent an email with details if anyone has a minute to give us some feedback.. no pressure.

cheers

moonoo2

moonoo2, I did some testing and didn’t have any problems. If you look at the test page and test DS I created, you’ll see a URL param of sortfield. Set to hours the DS behaves as expected. The DS also responds to $url-sort, so a URL of /test/?sort=hours also works. Change it to /test/?sort=system:id and you see the order change correctly. The DS sort value looks like this:

public $dsParamSORT = '{$url-sort:$sortfield}';

I am not doing any other complex filtering, so perhaps the problem lies with how you filter rather than a problem specifically with the sort method.

I think it mst be the setup of the filter for hours then…

jobs is the name of the page.. but in order to only display full-time job posts - we have placed /full-time after jobs in the url to filter out just full-time from the select link field called $hours..

is there another way of doing it?

Had a look at what you’ve tried Alistair and I see the XML in the debug area.

sortfield seems to sort by hours or term or whatever.. but all this does for me is place the sortfield selected as the first field present within the entry.

Is there anyway of sorting so that all of the part-time jobs appear first, then the full-time jobs after.. that’s what I thought the sorting would do.. but it doesn’t do this in your test page. any pointers?

Perhaps grouping by that field would produce the result you are after?

Sorry not sure I understand grouping.. what do you mean brendo?

Below is the block of code being used to display only full-time jobs on the page www.domain.co.uk/jobs/ url param on the jobs page is “hours”

<a href="{$root}/{$current-page}/full-time" title="{$labels/full-time}"><xsl:if test="$hours = 'full-time'"><xsl:attribute name="class">active</xsl:attribute></xsl:if>

Field:filter seems to be an interesting one for the admin area, but is is possbile to use it for front end DS filtering?

Could anything in the htaccess file prevent entries appearing on the url jobs/full-time/ and jobs/part-time/

### CHECK FOR TRAILING SLASH - Will ignore files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ /$1/ [L,R=301]

anyone have a heads up on this?

Could I change the param ?j=hours into /hours/ or is there an extension that would do this to all parameters?

I wonder if what’s being talked about here is a solution to what I am encountering? : related issue solution maybe

extra url parameter /full-time/ and /part-time/ breaks linkage to the datasource somehow if I have dsParamSORT set to anything other than system:id or system:date

Also really need a walk through of what carsten is on about in this link too.. yes I am thick.

ashooner

http://getsymphony.com/community/discussions/268/#position-19

I think what you talk about here is kind of what I’m missing.. combining DS params and url params. what was your findings/errors in the end?

Could my problem be related to how symphony sees parameters in url against how it reads DS filters?

looking at the debug of the page I am trying to filter.. the field hours with property of either Full time or Part time.. gets written as full-time or part-time in symphony speak.. but in looking at the debug of the page to try and match the filtering, I see that the data source with output parameter set to hours is written as Full time or Part time.. so they don’t match and it will not filter out the desired results!

any idea how to fix this anyone.. please.. oh please.. I’ve been really good and tried to debug my own stuff… :(….

looking at the debug of the page I am trying to filter.. the field hours with property of either Full time or Part time.. gets written as full-time or part-time in symphony speak.. but in looking at the debug of the page to try and match the filtering, I see that the data source with output parameter set to hours is written as Full time or Part time.. so they don’t match and it will not filter out the desired results!

A handle is a sanitised value that is safe for URLs to parse and use. For example, Bill & Ted becomes bill-and-ted. Symphony data sources can filter by the handle or by its proper value. So this is not your problem.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details