Search

Is it possible to limit DS if URL Parameter value say

$type != 'interview'

like http://pic2web.ru/article/interview and in this case I need this DS, in case http://pic2web.ru/article/techs I dont need it.

interview and techs are $type URL params.

(Formatting added — Nick)

Do you want to have different DS limits for different filter values? This can certainly be done in the PHP (take a look in /workspace/data-sources/).

And can you please try to formulate complete sentences and to use some sort of markup in your posts? Sometimes lines without punctuation but with links, code-snippets and Symphony-specific terms become a bit hard to read. :-)

No! not filter values. I need xml generation for DS interview list only if $type=interview

Why not filter in the XSLT?

<xsl:if test="$type = 'interview'">
   [your XSLT here]
</xsl:if>

Unfortunately this isn’t possible. The “Required URL Parameter” option in the DS editor just allows the name of a parameter and not its value.

What sort of entries are you filtering? It seems to me like you need to add a Tag List or a Select Box to your entries with possible values of “Interview” and “Techs”, and filter on this field with the $type parameter.

Or you could customise your DS PHP to look at the $_GET values or environment parameters directly.

I’m still fighting that performance problem I wrote about. First I’m trying to reduce sql queries on building xml. And as I need DS interview only for type=”interview” so i’m trying to limit it somehow for that case.

Select box wont go )) as it will make things more difficult for content creation.

Or you could customise your DS PHP to look at the $_GET values or environment parameters directly.

Should I know how I can do that I would have already got that task accomplished ))

What field in your section determines whether an entry is an Interview or not?

That was solved by adding limiting by ($url-interview) ?interview=yes now works much quicker, going to try caching

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