How to make full site searchable in silverstripe.The defaults searches only the title and content but not the textfield.
Any help is accepted.
Check out https://stackoverflow.com/a/14489700/494421 for searching custom DataObjects.
There is also a robust search module that uses Lucene under the hood: https://code.google.com/p/lucene-silverstripe-plugin/ There are many configuration options, including searching custom fields.
Silverstripe does not permit to search in custom fields.
You can implement search on arbitrary Page fields and also on arbitrary DataObject pages using zirak/searchable-dataobjects module.
Related
Alfresco simple search field searches on document content and folders as default.
Because I'm thinking of using a tag taxonomy I would like to default the simple search field to only search on tags without using the "TAG:" prefix and exclude content and folders. Content and folders can stay as a search option in Advanced search.
The default query looks like this:
cm:name cm:title cm:description my:authorisedBy
ia:whatEvent ia:descriptionEvent lnk:title
lnk:description TEXT TAG
Can anyone give me an idea how this query can be modified only to search on tags?
I'm going to assume that by "simple search" you're referring to the search box in the header bar displayed in Share. This is rendered by the Aikau widget alfresco/header/SearchBox and provides a number of options for customizations.
I think that your best option is going to be to extend the default widget with your own version and override the generateSearchTerm function. This will allow you to take the term provided (e.g. whatever the user has entered into the search box) and manipulate it with the additional advanced search text before it is used in calls to the search REST APIs.
This old blog post provides and example of extending a widget, however you should use the approach outlined in this blog post to add your custom package (rather than editing surf.xml directly)
Hello.
I guess it's very simple, but I cannot find the solution of my problem anywhere. I want to add the "google-maps" field with the plugin Advanced Custom Fields (and there is plenty of instructions for this action in the internet). But ACF doesn't give me such option. In the list of possible types of fields there is no "google map", see the screenshot with the available types. Should I switch it on somehow previously, and if yes, where is the setting? Thank you.
1
Wordpress 4.5.2, ACF 4.4.7
I want to add a new entity named "ideas" having different fields. I want to add this to the admin side, where a logged in user can add/edit new "idea", which can be published/unpublished to the site.
I don't want to edit via php and make things complicated, instead do it from the wp-admin log in front-end. Is there a plugin for this? I need 3-4 such entities to be created, and define fields for each such entity.
New edit:
Custom Post Type is the best option I feel. Can anyone suggest, a free plugin for form to capture the values for the custom post type?
According to this WCK - Custom Fields and Custom Post Types Creator plugin you can achieve this.
WordPress Creation Kit consists of three tools that can help you
create and maintain custom post types, custom taxonomies and most
importantly, custom fields and metaboxes for your posts, pages or
CPT's.
WCK Custom Fields Creator offers an UI for setting up custom meta
boxes with custom fields for your posts, pages or custom post types.
Uses standard custom fields to store data.
WCK Custom Post Type Creator facilitates creating custom post types by
providing an UI for most of the arguments of register_post_type()
function.
WCK Taxonomy Creator allows you to easily create and edit custom
taxonomies for WordPress without any programming knowledge. It
provides an UI for most of the arguments of register_taxonomy()
function.
Hope it helps you.
You can use a combination of two plugins to fit your needs:
The Custom Post Type UI (https://wordpress.org/plugins/custom-post-type-ui/) makes it possible to generate Custom Post Types (like "Posts" or "Pages") and Custom Taxonomies. This is how you can create your entity "ideas" which will show up in the admin menu.
With Advanced Custom Fields (https://wordpress.org/plugins/advanced-custom-fields/) you can define additional content fields for your "ideas"-posttype and others. It also can handle relations between your added custom-post-types
Using the SWIFT Templates as proposed in Touqueer Shafis answer will be sufficient when you only have smaller bits of information to display on the page or if you just want to display archives of your custom-post-types. But you will quickly reach the borders of these templates when it comes to single-pages.
I recommend altering the PHP of your template files manually: you will have more control where and when to display the contents of the custom-post-types and custom-fields you added on your page.
Well, I'm not really gonna give you the answer you want to hear but I want to give you an advice from my own experience.
Using a plugin will make things usually much more complicated than doing it manually. Consider some things:
1) The plugin may not be supported for ever (or long), so if the author decides that he or she wants to be a gardener instead of a developer you're screwed. Unless you want to wrap your head around the plugin code and proceed developing it on your own. This is especially true for "underground"-plugins which are not so popular and/or maintained by a single person. Although I think you CAN rely on the "big" players like "Advanced custom fields"
2) At some point you may find that the plugin you are using doesn't support some sort of customization that you really need and quite a few plugins are built in a way that makes it hard to extend them or break out from the way they work.
So I recommend you to wrap your head around custom taxonomies and post types and just add them with PHP in your functions.php or a custom plugin. It's very very easy (it's really just arrays with arguments). You could use this visual code generator as a starting point:
http://generatewp.com/post-type/
And for adding custom fields I recommend using Advanced custom fields. You won't need any other plugin for backend management customization and it's built in a way that you can even export your custom fields as php so if they ever drop support you still have a good starting point.
I need to customize drupal search form with different search options (color, year, type, etc). After user pressed "Search" button, drupal must show view (according to search options that user specified) with some addtional exposed filters. What is the best way of doing this?
As you mentioned, a view w/ exposed filters is probably best. This is what we use when performance is not at stake (i.e. Less than 100,000 nodes.) I believe if you use the correct field it will even hook into the Drupal search index. I'll edit later to confirm this.
EDIT: I was incorrect. We use the filter "Search: Search Terms". However, this still comes w/ the default install of the Search module and the Views module in both D6 and D7. So the answer would be to setup search just as you would, and then redirect "mydomain.com/search" to your custom Views based search page. You can use the filter above when searching the title or body and normal date and other filters can be applied alongside this.
NOTE: For higher numbers of nodes, we use solr to augment search, but this probably overkill for your problem.
Configure Apache Solr search and Use the color codes as facets.
Follow the below url.
Facet API
I need help on how to create a 'custom form' using the same fields provided by cck.
Drupal gives you the ability to add fields to 'nodes' and how to theme their output. But I would like to be able to post a data from my own form (that pops-up) and sends data to the drupal database using the same drupal cck.
How do I access the specific form inputs to add data to my content types ? because the default form is kind of 'ugly' and loads on different page(without ajax).
Help would be much appreciated
There are several routes you could go down.
The easier option is to use the Webforms module. While this gives you similar fields to cck, they are not exactly the same, and if you have a module that implements a specific cck field type, it won't be available to webforms.
The second choice is to write your own module using the forms api. This can mean a lot of learning, add it takes time to get up to speed, but ultimately you have total control over how your form will look and behave. The forms api doesn't give you exactly the same fields, but all the tools are there to create them. Sometimes you need to hack open a module to find out haw a specific field is implemented.
A third option would be to use cck itself. You could create a content type and add the field types you want on your form. You would them give users permission to create but not view or edit the content type. The form submissions would them be nodes on your website. This would make me slightly nervous, so make sure all your permissions are correct!
The second part of your question: you can use a theme file to override the appearance of most forms and make them pretty.
James