I have a Content Part in Orchard, to which I added a Taxonomy Field and set it to allow multiple terms. When I save a content item, it looks like the terms are re-ordered in alphabetical order. But I would like to preserve the order in which they were authored in the field.
E.g. here is what I author in my Taxonomy field:
Contributors: [Sebastien Ros] [Bertrand Le Roy]
And here is what it turns into after saving:
Contributors: [Bertrand Le Roy] [Sebastien Ros]
Is there a way to prevent terms re-ordering? If this is by design, does anyone familiar with implementation know if this can be patched easily? Would it make sense to create a pull-request and contribute a patch to Orchard? I mean, would it be useful for other users, so that the fix has a chance to be included in core. (Otherwise, I would have to maintain a modified version of Orchard and have problems upgrading to new versions, which is undesirable of course).
Thanks!
You should never count on the order in which the records are stored in the database. It is way too brittle, and has never been designed for this. If you need to have control over the order of terms, and have different orders depending on context, you need to use something else. The latest source code version of Vandelay.Industries has a projection filter that lets you drag and drop items in the order you want, for that specific projection.
If you go to the taxonomy section and look for the term itself, you will see a property call Weight which says..: 'If specified, it will be used to sort terms at the same level'.
That should do it.
Related
The current CRM UI allows you to create relatively complex queries which you can even extend further with tools like FetchXML Builder.
However, when we get to select the columns in the View layout, the interface provides access only to the first direct related set of entities and does not navigate further down.
There are many cases where the column you want to include in the View is just "two-clicks" away and you cannot include it because is "too far". To make things worse, the FetchXML Builder allows you to re-write the join but it does not allow you change the the columns layout you started with when you opened the View initially. IOW, you can modify the query logic but you cannot include additional columns as required.
One possible solution would be to edit the solution directly and inject the FetchXML directly (I have not tried this though) but I would like to listen to the community opinion first or to other possible solution.
Regards and thank you for taking your time.
Unfortunately this is a long existing limitation. There is no supported customization workaround to circumvent this other than building a Fetchxml report or Power BI report to embed with the necessary layout.
From documentation:
You can include columns from the current entity or any of the related entities that have a 1:N entity relationship with the current entity.
You can tweak the layoutxml of any view, but still it has to be in supported zone to avoid failures.
here's a really quick question...
Is there a type of Sitecore Editor control that I can use in the Template Builder to enable the product owners to add a free collection of strings in the CMS Editor?
I know that I can add a simple data object that has a single string field, add a number of these data objects and then add a Multilist to the Editor with that group of data objects as the Source, but that would mean that the product owners would have to add all of their strings as these data objects and then select them from the Multilist.
I'm trying to make it simpler for them, but I can't seem to find a Sitecore Editor control that enables them to enter a collection of strings directly in the Editor... is there one?
The short answer is no, there is no way to do this in Sitecore.
All hope is not lost, however. You can always create your own field type for something like this, but doing so does require a significant level of effort.
I created a basic OOTB document library to store Word and PDF files. I have been tasked to also create a few columns to store some basic metadata about the uploaded documents, for example: AuthorFirstName, AuthorLastName, and a column that lists "topics" discussed in the document.
While I am generally familiar with most Document Library settings, and creating columns, I am seeking information on what column datatype might work best for "topics". In most situations, one uploaded document would have 1-4 topics.
I would rather the datatype not be a single line of text datatype, as I would rather not ask the user to separate the different values (topics) using a delimiter such as a comma or semicolon. I would like to offer users the option to sort or filter in the SharePoint views.
There also seem to be some limitations with the Choice datatype.
While Choice fields seem to support Fill-In Values, when a choice is not pre-populated, they only seem to allow 1 fill-in. I would like the user to able to use a repeating-table-like interface to add a topic, and click an "add" button, and repeat, and so on.
I think in your scenario the best approach would be using managed metadata feature (http://office.microsoft.com/en-us/sharepoint-help/introduction-to-managed-metadata-HA102832521.aspx). It allows you to sort/filter library items, allows users to add new terms into metadata storage, etc.
Using a Lookup field to a custom List is something worth considering. The main advantage is that your data choices are stored separately from the main list and are easier to track and manage. The disadvantage is that you cannot easily have the user add a fill-in option as you desire. You would have to have a link from the library or the upload form to the options list where they would enter a new option separately from tagging it on the document.
Managed metadata is certainly an option as well, but it requires more overhead and sorting/filtering on that is a little trickier. Using a Lookup column is simple, although it does not meet all of your needs.
We need to provide search options for users to find content based on specific field values.
We're developing a Training Course module for a client but the standard search looks for the text in any indexed field. We want to allow users to find courses based on searches against specific fields (i.e. Course Type, Location, Price, Date).
We've extended the search to check against specific fields but can't work out how to get the URL parameters passed by the Search form as a GET.
Where does Orchard put URL parameters?
Also, are we missing something, is there a way that Orchard already supports this that we haven't realized?
I would suggest you to copy part of the Search module, more specifically the Controller and the View and then modify it to suit your specific needs. I see you are actually modifying the original module, but this might be a problem on the long term, for instance if we start updating the module you might either lose you changes or have to reapply them to the code base. In the end you will target a MySiteName.Search module. And you can also add custom routes, custom settings.
On a side note the Search API is really powerful and you can even use it to do faceted search, or search on inherited taxonomy terms, tags, full text, ranges, ... Having your own controller code will let you use all of these features easily.
I haven't used Solr for about three years, and I see that it has now jumped up to 3.5.
The "Documents" that I am trying to add to my Index are properties.
The majority of all properties will have about ten of the same types of fields. Such as
Longitude
Latitude
Name
Location Name.. etc
However, I also want to add in attributes about the property which should be facetable.
Property receive features, which are grouped into ten of so categories. Such as...
(Entertainment, Attractions, General, Kitchen, Spa etc). And then the user when adding their property would select items from a pre defined list.
So that for example, if they are adding General features, they might check:
✓ Heating, ✓ Balcony, ✓ Garage, ✓ Washing Machine etc.
Then on my presentation layer, These options might be displayed under the heading General with all of the available facets that fall within the General category.
So, this is my problem... if I make a facet field called "general" I would actually want to add a lot of values to this field. But then can you facet over a multi valued field?
And then I would want to do exactly the same for "spa" where the user might check that the property has a Swimming Pool, Sauna and a load of other features etc.
Any advice as to how I should construct my schema would be appreciated.
Yes, you can facet over multivalued field. Watch this presentation by Solr's developer about facets:
The Many Facets of Apache Solr by Yonik Seeley
I hope that this will have all answers you need. Only thing you need to do in schema is to set the field as multivalued (and maybe also make some processing if this is text not ids, but this is showed nicely in presentation and slides