97 Posts
Anjo
8 years ago
Topic

Hi all,

I am using Search Query Field http://www.seblod.com/store/extensions/19157 to allow clients to check if the title (art_title) of an entry already exists.

It is working fine but I can't make the titles on search results link to content view. I've tried the usual link view (#2) in list but no luck. Is this possible?

The code I am using on the search query is:

SELECT title FROM #__content 

WHERE [MATCH]title||$uri->getValue('dir_keywords')[/MATCH]

And on the List I add the Article Title. 


Any help would be greatly appreciated.

Anjo

Get a Book for SEBLOD
154 Posts
WebOne
8 years ago
3
Level 1

You could try grabbing more than just the title from the query. Get the IDof the content item also.
Then in the list use an HTML typo and construct the link manually.

<a href="/...linktocontent..including.value....$cck->getValue('id')....">*value*</a>

97 Posts
Anjo
8 years ago
2
Level 2

Hi WebOne,

Thanks for the reply. I have tried your suggestion of creating the link manually and in theory it should work. However the html plugin is not converting the the $cck->getValue to its value. I decided to use title alias instead of id but on the address bar I get 

http://localhost/search-listings/$cck-getValue('art_alias); 

even though it prints the alias on the search results page. Maybe there is a bug.

Thanks for your help

Anjo




154 Posts
WebOne
8 years ago
1
Level 3

For the Search Query field you must pull in the values via a DB query and add/map these fields in the LIST.



So if you are using art_alias are you getting that value also from the Search Query ..

eg:

SELECT art_alias, title ....

and then mapping those two fields in the LIST?

Also see:

http://www.seblod.com/resources/tutorials/using-the-search-query-field-plugin

If you are using the HTML typo field you will also need to set the relevant id/art_alias field to hidden (can at first leave visible to see if it's getting the right values from the query)

97 Posts
Anjo
8 years ago
0
Level 4

Thanks for your suggestions. Not sure what was going wrong but after changing and testing all templates it is now working for all of them.

Regards

Claudio

Get a VIP membership