Giter Site home page Giter Site logo

barsonax / sitecoresearchfields Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 0.0 57 KB

Custom fields for sitecore that work well with search

License: MIT License

PowerShell 11.30% C# 77.64% Shell 8.41% ASP.NET 2.65%
sitecore buckets customfields csharp search

sitecoresearchfields's Introduction

SitecoreSearchFields

Did you run into the limitations of the build-in fields in sitecore when using buckets or a heavily search driven workflow for content editors? Is it hard to find your items that are in buckets when using droplink or multilist fields? Would you wish you could have proper search enabled fields?

Because I ran into these limitations I reverse engineered how sitecore uses the search UI and adapted it so I could made these custom search enabled fields. These custom fields provide the same search UI functionality that you normally get when using buckets so everything works as you would expect such as:

  • Basic search functionality
  • Facets
  • Bucket settings

Uses sitecore 9.2 but might work with other versions as well.

Documentation

The documentation can be found in the wiki

sitecoresearchfields's People

Contributors

barsonax avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sitecoresearchfields's Issues

Document how to use the search page for other purposes

The following code will open up a search modal which is used in the custom fields but could also be used for other purposes

var url = Sitecore.UIUtil.GetUri("control:DroplinkSearch",  $"id={id}&{PfilterParameter}={persistentFilter}");               
SheerResponse.ShowModalDialog(url, "1300", "700", "", true);
args.WaitForPostBack();

Document what you can do with this view

Add field type config

Some config should be added for all custom fields:

  <sitecore>
    <fieldTypes>
      <fieldType name="SingleLinkSearch" type="Sitecore.Data.Fields.LookupField,Sitecore.Kernel"/>
    </fieldTypes>
  </sitecore>

This will allow sitecore to understand its a reference which is needed for rebuilding the link database and possibly more.

Split project in separate projects

Split the single project we have now into multiple projects:

  • A shared project containing shared logic such as the search view itself
  • A project for each field containing just the code needed for the field.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.