Modx(Revolution) search function for FAQs - search

I'm trying to implement a search for my FAQs page. I'm using the modx extras FAQ Manager and SimpleSearch. SimpleSearch works quite well if you're searching modx resources, but the problem I've run into is how to search a database table for example the FAQ Manager table where the content is not tied to a resource. Is this possible?
I've noticed that SimpleSearch has a &customPackages property, but I can't seem to get it to work. If someone could show me an example of how to use simple search in conjunction with FAQ Manager, I would be most appreciative.

You can search in a custom package through AdvSearch with a custom queryhook: http://www.revo.wangba.fr/custom-package-dvd-shop/
and the corresponding snippet since the link doesn't seem to work: http://www.revo.wangba.fr/assets/files/advsearch/queryhook/dvdqhook.snippet.txt

I believe you can use the advanced search package to search database tables: http://rtfm.modx.com/extras/revo/advsearch

Related

Grav - Parse URL

I want to define a new template called "product".
This template calls an external service and retrieves the information about that specific product. That is easily done with a custom plugin that access the product information. Information on how to do that has been found here.
However, I would like that the URL of the page would be something like:
/product/<id>/<seo-friendly-description>
So I can retrieve in the Twig template both <id> and <seo-friendly-description> which will be used later to retrieve the specific product information.
I have tried to find something that could help in the documentation, without success. Could someone either point me to the right doc section or highlight the basic steps that shall be achieved so I can start solving this issue?
Just in case it helps, I am trying to find something similar to how bottle or other web frameworks work:
#route('/hello/<name>')
def greet(name):
return 'Hello ' + name
I've been building a family recipebook into my own website and I've been working through a similar problem. I haven't quite worked out all the kinks, but my solution is mostly working if you want to checkout my github repo.
In short, you need the plugin to watch what the active route is. If the route matches, you then create the page and populate it using your plugin data.
I haven't quite figured out how to get the active page to highlight in the navigation menu for generated pages, but you might still find this solution helpful.

Customize Search Portlet in Liferay DXP 7

I would like your support in order to get some help in customizing the search component in Liferay DXP 7.0 Enterprise.
I have reviewed all the available documentation but although I have found many articles about the issue, the step by step is not so clear for me.
I need to customize the native search component:
Change the input component to give suggestions while the user is typing the search terms
Change the search result page look and feel.
Anyone ever implemented anything like this?
I know this is an old thread, but StackOverflow keeps showing it as the first open question when I am navigation this particular tag...So here are some pointers, as this is a pretty broad topic...
The search is really confusing for adding customization. Mainly you have to provide some of them as contributors, using the asset framework. following the regular steps to build an asset for the asset publisher you will hit the best place to find documentation about the search contributors.
About the search page, best is to create a new page, besides the default one for extra freedom. As long you use the friendly URL /search it will a basic replacement. In this page you can add everything you need, except for translations for the friendly URL - not great. Another option is to keep the default page (which will not be visible in the build area 7.1.x, but you can edit after you search something and fall inside it).

How to use lucene query syntax on Orchard CMS

I would like to use the full Lucene query syntax on an Orchard CMS based Website.
Currently, after enabling the indexing and search on Orchard, I can search on the website according to the fields I selected on the Orchard search administration page,
but I cannot perform one search on a particular field only (without changing the behavior on the entire search)
I cannot use fuzzy search...
From the logs, I can see that Orchard take care of that part (providing Lucene a good query syntax), but I would like to do it on my own.
For example, when searching "wel" on the website, Orchard will send to Lucene this query : title:wel* body:wel* (if I have the title and body fields activated on the search).
I did see some blogs that talk about coding some features to customize search, but I would like to be sure I'm not missing something before switching to developer mode :)
There are so many scenarios that can be done with search that there is no way to provide such coverage out of the box, which is why the API is very simple to use if you need custom searching capabilities.
You should copy-paste the controller from the search module and use the Parse() method of the ISearchBuilder with the escape parameter to false. This will parse a pure lucene query. You can also use the WithField("body", "value") to do simpler field search.
I don't believe anyone has released any modules that provide additional search functionality, because if you need it, it is so simple to develop ^_^ So yes, you will have to go dev mode to do custom field search

Definitive method to exclude page sections from main search engines

I have quite a few constant parts of pages I'd like to exclude from displaying in search results to prevent obscuring of the unique content on each respective page.
I read that class="nocontent" will perform this action for Google. But what about the other main search engines like Yahoo and Bing? Is there a globally accepted solution for this, or is there an additional step to get them to do the same?
Thank you for any assistance.
Google doesn't offer such a feature for the general search. The class nocontent is only for Google Custom Search. The comments googleon/googleoff are only for Google Search Appliance.
Yahoo! introduced the class robots-nocontent in 2007. Google doesn't support it.
There is a microformats draft, but it has probably no support.
Despite that, there are some "hacks" that could accomplish what you need, but I wouldn't count on or use them. For example: inserting content with JS, or embedding content in iframe (and blocking the source URL in robots.txt).

develope a website using visulaforce

I'm trying to develop a website using Visualforce with Apex.
But I'm unable.
Please me with the documents and websites regarding them, I'm unable to find docs regarded Visualforce.
The best thing you can do to get started is checkout:
An Introduction to Force.com Sites
Visualforce documentation: http://www.salesforce.com/us/developer/docs/pages/index.htm
Based on the comment to the question (doesn't really answer the original question):
Let's say your salesforce environment is on https://na5.salesforce.com, your visualforce page is called "myPage", and you want to display on it data from "myCustomObject__c". Let's also say that there exists at least 1 record in the table of myCustomObjects and it's ID is "0067000000AH3ME" (you can see the ID of the object in the URL when you view it like https://na5.salesforce.com/0067000000AH3ME).
If your visualforce page looks similar to this:
<apex:page standardController="myCustomObject__c">
<apex:pageBlock title="Hi Javatechi">
<p>You're viewing the {!myCustomObject__c.Name} record.</p>
</apex:pageBlock>
<apex:detail relatedList="false" />
</apex:page>
Then this page should display something meaningful when you visit it via this url:
https://na5.salesforce.com/apex/myPage/?id=0067000000AH3ME
If you'll be able to make this example work for you, all the rest like <apex:inputField> and <apex:commandButton> should start to work too.
Run screaming from salesforce now, before it is too late. It only gets worse.

Resources