Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
61 posts Page 6 of 7
Previous 1 ... 3, 4, 5, 6, 7 Next
@trendoman
Wowwww, what a brilliant solution! Million thanks, trendoman! It's working as expected ;)

Attila
Hi Guys,

Sorry to resuscitate this topic again for the umpteenth time, but this topic has helped me get very close to my end goal in regards to search, and I need a tiny bit of help to get the final part there.

So the site I'm creating is more of a web application, which stores personal information (name, age, driving license boolean, qualifications e.t.c.) and so to search the database I've added a search bar using <cms:search_form> which uses a template named search.php as the processor.

This is brilliant for searching for anything in plain text, but it didn't look to be showing results for anything stored as a dropdown or checkbox (likely because they're stored as arrays?).

As a workaround to this issue I managed to find this topic, and implemented the filters using the example, which was working absolutely perfectly - I had managed to make every filter work, and it did also work with the search until I added a second test user in.

The problem now is that sometimes it's duplicating the results, and other times it isn't.

I have a feeling I know exactly what the problem is, and you'll likely agree it's the following:

Code: Select all
      <cms:search masterpage="candidates.php">
        <cms:pages masterpage="candidates.php" custom_field="<cms:show my_search_str/>">


So I have 2 questions really as follows:
1. Is there a way to use <cms:search_form> to also include content from dropdowns/checkboxes?
2. What is the best way of implementing an actual search along with the <cms:pages> filtering?

Many Thanks,
Nathan
Hi, to avoid duplication it might be helpful to exclude pages found with 'cms:search' from filters?
Samples from docs:
Code: Select all
<cms:pages masterpage='blog.php' id='NOT 14, 13'></cms:pages>

<cms:pages masterpage='blog.php' page_name='NOT my_first_entry, my_another_entry'></cms:pages>

It is hard to provide a solution based on little info from the post. If you can provide an online playground, would be best.

your best friends: github, StackOverflow, telegram
Hi Trendoman,

Thanks for your response.

After a bit of rethinking I've ended up removing the <cms:search> tag completely and are relying on <cms:pages> instead.
This now looks to be working perfectly, and is pulling the user's input into the filter string to be checked against the full_name field.
Hi guys!

There are situations when after filtering the results using KK solution, a report has to be printed. In order to help people recognize, as much as possible, what kind of data are shown in the report, would be grate to display in the report every search criteria used for obtaining the displayed data.
Is this possible?

Thanks!
????
@atisz, more details please.
display in the report every search criteria used for obtaining the displayed data.

Please post a dummy sample of such a display showing exactly what you'd want to show.
KK wrote: @atisz, more details please.
display in the report every search criteria used for obtaining the displayed data.

Please post a dummy sample of such a display showing exactly what you'd want to show.


Ok. Let's say we have a snippet file called product-filter.html with 2 dropdown used for filtering the data in product-report.php:
- madeyears
- productstatus

On selecting some options and filtering the data, we obtain an URL like this:
Code: Select all
http://domain.com/members/product-report.php?madeyears=2017-01-01+%23+2018-01-01&productstatus=Available&submit=Generate+report&k_hid_quicksearch=quicksearch&nc=1

and product-report.php will list the according data:
- product name
- price
- producer
- warranty

On printing this results, the report should contain:
1. report title (Product report)
2. what kind of data are displayed after filtering (Products listed bellow were made in 2017 and their status is Available)
3. the table containing products data: (product name, price, producer, warranty)

Everything is set up and working accept
2. what kind of data are displayed after filtering (Products listed bellow were made in 2017 and their status is Available)

This is what I would like to know how can be done.
Is there anyone who use filtered search with multi language addon?
I have two language (English/French) in my website. When I use filtered search It always shows results in default language(English)
Am I doing something wrong?
Any idea?
Previous 1 ... 3, 4, 5, 6, 7 Next
61 posts Page 6 of 7
cron