More than TaxonomyWords - Tamberra
Here at Tamberra, we see ourselves as professional digital problem solvers. We love a good mystery and that is what your project might be at this stage… a mystery. Who, what, where, when, why – these are all questions that we can help you answer.
Tampa, Web Development, Web Developers, Web Applications, Tampa Bay, Programmers, Newspaper Web Developer
5954
post-template-default,single,single-post,postid-5954,single-format-standard,do-etfw,ajax_fade,page_not_loaded,,vertical_menu_enabled,side_area_uncovered_from_content,qode-theme-ver-7.5,wpb-js-composer js-comp-ver-5.1,vc_responsive

More than TaxonomyWords

newslist VS contentlist

20 Aug More than TaxonomyWords

We have all done it. Ok, maybe not all of us, but I have done it… yesterday. Start with a pbs:newslist tag only to find that you need a variable that doesn’t exist in news.pbo (in my case, <%TotalCount%>). The solution for this, would be to use pbs:contentlist instead, which is really what I should have started with. Pbs:newslist has been my go-to for so long that I am currently in the process of trying to break myself of this habit.

 

While converting my pbs:newslist tag to pbs:contentlist there were several changes that needed to be made. One that stood out and the purpose of this post, is the TaxonomyWords option in both tags.

My initial newslist tag looked something like this:

  The result of this tag would be any article that contained both taxonomy word ID 5803 AND 5804. If an article was only assigned to one of the two, it wouldn’t show. Typical AND behavior. I would like to point out, that you are able to change the behavior of this tag to OR by adding Kwor=1 to the tag. ContentList has the same TaxonomyWords option available, so I created my ContentList tag like this:

 

 

{FieldName}Search definition for pbs:contentlist

{FieldName}Search definition for pbs:contentlist


While testing I realized that the tag was returning more results than expected. This was due to TaxonomyWords working like an OR and not an AND in this case. Everything being returned had 5803 OR 5804.

I then went to Saxo/NewsCycle docs – https://docs.saxotech.com/display/Onl/pbs+contentlist – to do some research.

I found the {FieldName}Search option.

{FieldName}Search
From version 7.0.0sr7

This parameter will enable free text search in pre-defined or custom fields. Possible pre-defined field names are: Keywords, TaxonomyLeaf, TaxonomyLeafId, Taxonomy, TaxonomyId, Rating, Location, Byline, Date, GeoName, GeoLocation, Channels, NumberImages, Category, Heading, Type, Types, SubTypes, DetailTypes, Summary, Module, Class, EventDate, TypeName, Year, Month, Day and CreatedTime. When searching in custom fields the name used in the specific content type must be used.

 

I changed my contentlist to use TaxonomyIdSearch, and the results returned were correct, with the TaxonomyIdSearch working like the AND that I needed.

Taxonomy Success.
Lesson Learned: The newslist TaxonomyWords option works as an AND, the contentlist TaxonomyWords option works as an OR.

 

 

Kara Noreika

Kara Noreika

Kara has been working as a web developer for the last 10 years. Experienced in HTML, CSS, JS, AJAX, PHP, Java, C#, Newscycle Digital, Polopoly, WordPress, Drupal, and more!
Kara Noreika