Projects https://our.umbraco.org Mon, 03 Aug 2015 10:36:58 +00:00 umbraco Latests packages from the forum on our.umbraco.org en FlexewebCommerce Starter Kit https://our.umbraco.org/projects/starter-kits/flexewebcommerce-starter-kit/ https://our.umbraco.org/projects/starter-kits/flexewebcommerce-starter-kit/ This starter kit gives you all the common features you need to set up an online shop, such as a basket, checkout, payment, account management, admin tools, delivered in angular and jquery.

This package also contains the core FlexewebCommerce libraries complete with apis, providers and services


Please note: FlexewebCommerce is a provider based system. It is advisable that once the package is installed you set up the configurations for the providers using the config file supplied- /config/FlexewebCommerce/flxCommerce.config

 

Features:

BASKET

  • MiniBasket partial view
  • Basket template
  • Javascript Add To Basket feature

CHECKOUT

  • Checkout surface controller
  • 4 stage checkout process including - register, delivery, payment and reciept supported by Windows Workflow Foundation
  • Several handy FlexewebCommerce client side tools including postcode finder
  • 2 payment gateways - Sagepay and Paypal

ACCOUNT MANAGEMENT

  • Templates and javascript to register new users
  • Add and edit user address, orders, and profile partial views
  • Login and logout templates and javascript
  • Forget password template and javascript

 EMAIL MESSAGING

  • Create and edit Order email templates for admin and users

ADMIN TOOLS

  • Catalogues
  • Marketing Campaigns
  • Order Management
OTHER
  • List products by category macro
  • Product attributes macro
  • Checkout content nodes
  • FlexewebCommerce config file to configure the default providers supplied

 

]]>
Simon Osborne Thu, 30 Jul 2015 13:46:11 +00:00
Skybrud.Umbraco.GridData https://our.umbraco.org/projects/developer-tools/skybrudumbracogriddata/ https://our.umbraco.org/projects/developer-tools/skybrudumbracogriddata/ Skybrud.Umbraco.GridData is a small package with a strongly typed model for the new grid in Umbraco 7.2.

The package makes it easy to use the model in your MVC views, master pages or even in your custom logic - eg. to index the grid data in Examine for better searches.

NuGet

The package is available on NuGet as well. This is the recommended approach to installing the package:

PM> Install-Package Skybrud.Umbraco.GridData

Documentation

You can find a bit of documentation for this package on GitHub.

]]>
Anders Bjerner Wed, 29 Jul 2015 12:59:03 +00:00
Umbraco 7 TypeScript Definitions https://our.umbraco.org/projects/developer-tools/umbraco-7-typescript-definitions/ https://our.umbraco.org/projects/developer-tools/umbraco-7-typescript-definitions/ This package provides access to the TypeScript definitions for the backoffice of Umbraco.  It should assist development of property editors, dialogs and custom sections.  It started out as a project for myself but it's really helped me out so much, I thought I'd release it to the community.

How to use it?

Simply install this package or install through NuGet.  I recommend installing angularjs.typescript.definitelytyped nuget package as well.  That will give you full intellisense for both the backoffice of umbraco and now angularjs.

It will provide the following:

  • Intellisense for useful resources and services
  • Provide access to available methods for the specific resource or service
  • Intellisense for parameters
  • Intellisense for the return types (including parameters for the callback)
  • Helps build the required arguments to pass to the methods
You can view the screenshots below for a better idea on what this does.
 
 
How to start out

Install this package or via NuGet :

PM> Install-Package UmbracoTypescriptDefinition

 

Create a new TypeScript file in Visual Studio, and reference the definitions by dragging in the file onto the typescript editor.  Make sure the typed definitions are included in Visual Studio.

Now you should be able to do:

angular.module("umbraco").controller("propertyEditorController",
        ["$scope", "notificationsService",
                function($scope: ng.IScope, notificationsService: umbraco.services.notificationService) {
                        //if I reference notificationsService anywhere, I will get intellisense
                        notificationsService.info("someHeader", "someMessage");
                  }                

]);

Don't forget to also install AngularJS.TypeScript.DefinitelyTyped.

I will be open sourcing this in the next few days ready for any contributions, if you'd like to help out.

 

Update:

1.1 Fixes a problem with iPromise

1.0 Initial release

]]>
Craig Noble Sat, 25 Jul 2015 19:43:18 +00:00
Color Palettes https://our.umbraco.org/projects/backoffice-extensions/color-palettes/ https://our.umbraco.org/projects/backoffice-extensions/color-palettes/ Color Palettes is a simple property editor that let you define different color palettes and present them to the editor as a list of radio buttons.

It is also possible to request defined color palettes from Adobe Kuler or COLOURlovers 
by entering the theme/palette id.

This package can be useful if you want to use a specific style/theme for the page (e.g. by adding the palette alias to <body>), use styles on specific elements or widgets.


To use the selected palette in your razor view add the following namespaces:

@using Our.Umbraco.ColorPalettes.Models;
@using Our.Umbraco.ColorPalettes.Converters;

 

and to get the selected palette:

Strongly typed example

ColorPalette palette = Model.Content.GetPropertyValue<ColorPalette>("theme");
var colors = palette.Colors;

 

Dynamic example

ColorPalette palette = (ColorPalette)CurrentPage.theme;
var colors = palette.Colors;

or

var colors = ((ColorPalette)CurrentPage.theme).Colors;

 

You can also loop through each color defined in the palette:

@foreach (var color in palette.Colors)
{
        @color.Code;
}

 

or get a specific color in the palette:

string color1 = palette.Colors.ElementAt(0).Code,
       color2 = palette.Colors.ElementAt(1).Code,
       color3 = palette.Colors.ElementAt(2).Code,
       color4 = palette.Colors.ElementAt(3).Code,
       color5 = palette.Colors.ElementAt(4).Code;

 

1.0.1

  • NEW: Added camelCase filter to autofill alias on first edit.


1.0.0

  • Initial release.

 

]]>
Bjarne Fyrstenborg Mon, 20 Jul 2015 14:52:40 +00:00
MdEdit https://our.umbraco.org/projects/collaboration/mdedit/ https://our.umbraco.org/projects/collaboration/mdedit/ MdEdit is a mark-down editor

 

The default editor for Velstand

https://our.umbraco.org/projects/starter-kits/velstand/

 

]]>
shwld Sun, 19 Jul 2015 16:33:53 +00:00
ExamineTools https://our.umbraco.org/projects/website-utilities/examinetools/ https://our.umbraco.org/projects/website-utilities/examinetools/ ExamineTools is a collection of enhancements for the default Examine content search and indexing.

The features are outlined below - refer to the documentation for a detailed explanation on how to use ExamineTools.

It's still a beta!

Note that this package is still in beta! If you find any issues, please report them in the forum.

Scoped search

With ExamineTools you can scope your search to a subset of the content tree, ensuring that you will only get search results from within the search scope. 

The usage and syntax is pretty much exactly the same as the built-in Umbraco search; all you need to add is the ID of the page that marks the top of the search scope in the content tree. 

Hide from search

ExamineTools lets you omit individual content items from the search results, even if the content type is being indexed by Examine. 

Simply you add a checkbox called "umbracoSearchHide" to your content type. Any content based on this content type having the "umbracoSearchHide" checkbox checked won't appear in the search results.

Extract text from JSON

ExamineTools can extract the text values of JSON objects and replace the JSON with the extracted text values in the Examine index. 

You can enable this feature per field in your index.

Replace node IDs with property values

ExamineTools can replace content node IDs (from content picker, multi node tree picker, etc...) with specified property values of the selected content items. 

You can configure this feature per field in your index.

]]>
Kenn Jacobsen Thu, 16 Jul 2015 07:36:07 +00:00
User Group Permissions https://our.umbraco.org/projects/backoffice-extensions/user-group-permissions/ https://our.umbraco.org/projects/backoffice-extensions/user-group-permissions/

Overview

User Group Permissions allows permissions to be set on content nodes by user type rather than by individual users.

Updated for Umbraco 7

User Group Permissions is the Umbraco 7 version of Usergroup Permissions.

Interoperable

This package works with the existing Umbraco permission system, so you are still able to set permissions for individual users.

Source Code & Attribution

The source code is available on GitHub. It is based on the original codebase here and another fork here. The original was created by Richard Soeteman, and additional work was done by Carl Jackson.

Changelog

See here.

]]>
Nicholas Westby Thu, 16 Jul 2015 00:52:18 +00:00
Attackmonkey Grid Locker https://our.umbraco.org/projects/backoffice-extensions/attackmonkey-grid-locker/ https://our.umbraco.org/projects/backoffice-extensions/attackmonkey-grid-locker/ Installing this packages will make ALL grids on your site locked down for everyone apart from Administrators.

What does this mean? All non-admin users will be able to edit the content that is already on place in the grids, but they won't be able to add new items, re-order items, delete items, or add new rows.

At the moment this package is a very blunt tool, I would like to improve it to make it more configurable and to allow it to target specific grids. If anyone who's an Angular ninja fancies giving me a hand with this (my Angular skillz are far from l33t at the moment), please get in touch :)

]]>
Tim Fri, 10 Jul 2015 21:09:26 +00:00
PieMan Analytics https://our.umbraco.org/projects/backoffice-extensions/pieman-analytics/ https://our.umbraco.org/projects/backoffice-extensions/pieman-analytics/ NOTE: If you've installed an earlier version of PieMan, thanks. Best bet now though is to move to v0.4.0 - it fixes some stability issues and restores a kinda critical file missing from v0.2.0.

PieMan brings the goodness of Google Analytics into your Umbraco website, in a simple, clean view that's ideal for content authors.

Getting started
To use, create a new data type using the PieMan property editor and add it to a document type. PieMan is happiest on his own tab, just because he's greedy and likes the space.

PieMan needs authorisation to access your Analytics account - find the authorisation button in the settings dialog. PieMan isn't interested in your personal information, only the Google Analytics account details necessary to access those juicy stats.

Once you've granted PieMan permission to access your stats, you'll need to select an account and profile in the settings dialog. Save your selection, publish the page and refresh the back office - you should be good to go. It's a one-off process with the selections persisted as values on the datatype, so you'll have access to page-by-page stats without any further config.

Why PieMan?
Simple - pie charts are awesome.

Why only a subset of my stats?
Google Analytics is great at being Google Analytics. If you want the full suite of tools and complete data set, you're better off logging in to Google Anayltics.

If you want a high-level overview of how a particular page is performing, PieMan gives you that - visitors, pageviews, time on page, device, browser, new vs returning, over whatever timespan suits you best.

PieMan is not attempting to replace Google Analytics, but supplement it.

Changelog

v0.4.0 - Improves error handling (WIP), and corrects issue where root page would not return any data

v0.3.0 - Restores missing DLL (oops).

v0.2.0 - Adds comparisons in the main chart (total and unique views). 

Very much a Beta.

]]>
Nathan Woulfe Tue, 07 Jul 2015 05:03:00 +00:00
V7 Editors Manual - Bookshelf Edition https://our.umbraco.org/projects/backoffice-extensions/v7-editors-manual-bookshelf-edition/ https://our.umbraco.org/projects/backoffice-extensions/v7-editors-manual-bookshelf-edition/ This is an editable Markdown version of the documentation done by Matt Wootton and CAB Studios. (https://our.umbraco.org/projects/website-utilities/umbraco-7-editors-manual/)

The markdown was created in and is intended for use with Kevin Giszewski's Bookshelf Package. (https://our.umbraco.org/projects/backoffice-extensions/bookshelf/)

This is also available to download directly through the Bookshelf Package from github. (https://github.com/okhenry/V7-Editors-Manual/archive/master.zip)

This documentation is current through 7.1 and needs some updating to address new features such as the Grid editor.

]]>
Owen Henry Mon, 22 Jun 2015 19:17:21 +00:00
uHateoas - Umbraco Hypermedia As The Engine Of Application State https://our.umbraco.org/projects/developer-tools/uhateoas-umbraco-hypermedia-as-the-engine-of-application-state/ https://our.umbraco.org/projects/developer-tools/uhateoas-umbraco-hypermedia-as-the-engine-of-application-state/ Umbraco REST Hypermedia API.

We all love using Umbraco to build our websites, web & mobile apps, but not everyone has C# skills. Umbraco & UHATEOAS provide us with an intuitive web based UI to define, capture and maintain entities, relationships and rules for our content in an intuitive non technical interface, now coupled with a queryable, updatable Hypermedia REST API.

Project Site : http://uhateoas.wg2k.com
GitHub : https://github.com/uhateoas/uhateoas

When it comes to taking our content and using it on websites, mobile hybrid apps or anywhere you can dream of, it assumes a certain level of understanding of the ASP.NET stack, Webforms, MVC, Razor, Web API etc. 

This is not a problem for any ASP.NET developer, but what about someone that is great at HTML, CSS and Javascript and doesn't know or care about ASP.NET? 

At the moment you would need a ASP.NET developer to expose selected functionality and data via a custom written Web API, that would expose certain parts of the data stored in Umbraco. 

This could then be consumed by the front-end developer via the custom REST based API that the ASP.NET developer produced. 

With UHATEOAS, this is not necessary.

Simply install the UHATEOAS package and your Umbraco content is now automatically discoverable, navigable, query-able, page-able and editable via a standard Hypermedia API that is driven by the Document Types, DataTypes, Structure, Rules and User / Member Access Control that you define through the Umbraco Back-Office. 

Installation

Simply install the UHATEOAS package from the Project's section on Our Umbraco 

That's it, you are ready to rock! You are now able to query your Umbraco website using any REST client i.e. Advanced REST Client, Postman, Paw, Insomnia and of course via JavaScript using any of the JavaScript library's out there like jQuery, AngularJS, Polymer, Knockout, React etc. 

Content-Type Request Headers

We wanted the UHATEOAS API to be intuitive and easy to use ideally without any prior experience and with minimal or no documentation. That sounds typical of a lazy developer speaking, but Hypermedia As The Engine Of Application State really does deliver in this regard. Think of a website with lots of pages, with lots of relevant information, but with no hyper-links and no forms for accepting feedback. The web would never have taken off! 

So why make API's black boxes that need documentation just in order to use them? Why not simply surf to the web-site and specify the Content-Type Header that you would like to get the web-site's data returned to you in! By default if you don't specify a Content-Type Header, as you would expect you will simply get back HTML. If however you specify a different Content-Type Header instead of the default text/html, wouldn't it be great to get back the raw data of that resource in the format that you want it? 

This means that any page on your Umbraco web-site can now be served up in whatever format you support, via the URL that you would normally use on the web-site, simply by changing the Content-Type Header in the request. 

General Usage

As mentioned if you specify a Content-Type such as text/umbraco+json or text/json or text/xml, then all you need is to supply the starting point in your web-site, i.e. the starting URL. If you want access to all the content, start at the root of your web-site, if not, specify a more specific URL. Unlike most API's, you don't need to know or be told to use a specific API endpoint, you simply use the one you already know from surfing your web-site! 

Querying Umbraco

This is where the UHATEOAS API really shines. It can be used to query, segment, filter and page your content in a SQL/LINQ like way using simple name-value pair switches. These name/value pairs should be recognised by the average Umbraco developer, as they are concepts that you use every day when building sites using Razor. Now you can just use them directly via the URL as a set of URL based parameters! 

Editing Umbraco

The POST, PUT, PATCH and DELETE verbs allow you to do Create Update and Delete operations using IContent via the Content Service when logged in as an Umbraco Back-Office User.


The API exposes Actions based on the permissions of the logged-in Umbraco User. Please Note : PUT, PATCH and DELETE verb support has only been enabled in version 1.3.2.


The actions Create, Update and Delete are exposed as a collection of actions based on the User's admin rights and the DocumentTypes that are allowed under the current node. With the Umbraco Hypermedia API, you are able to create complex Single Page Applications without writing a single line of server-side code. It turns any Umbraco v7+ website into a REST based data repository with a very capable, query-able Hypermedia API!


We are working on a build where you will be able to map Umbraco Member roles to Umbraco Users as well as mapping anonymous visitors to an anonymous Umbraco User to facilitate creation of nodes for use cases like ContactUs, Comment etc where we would like to enable visitors that are not logged in to be able to use the POST and PATCH verbs in a controlled manner. 

]]>
Brendan Rokebrand Mon, 22 Jun 2015 15:30:32 +00:00
Pugpig for Umbraco v7 https://our.umbraco.org/projects/starter-kits/pugpig-for-umbraco-v7/ https://our.umbraco.org/projects/starter-kits/pugpig-for-umbraco-v7/ Starterkit package with which you can create pug pig publications. 

Install instructions

Install the package.  Move the newly create publications node to the root of your website.  Edit the content so that empty / missing images in edition and page nodes have images (NB creating a package does not allow addition of images from media section to the package hence missing images).  Publish publication and child pages.  In the properties tab of publication, editions and pages you will see pugpig urls. When using pugpig client reader you can set the ODPS url to publication url.

Made by The Cogworks.

]]>
The Cogworks Tue, 16 Jun 2015 09:37:46 +00:00
GNU Pratchett https://our.umbraco.org/projects/website-utilities/gnu-pratchett/ https://our.umbraco.org/projects/website-utilities/gnu-pratchett/ This is a simple package that inserts the X-Clacks-Overhead HTTP header to your site, containing the name of the author Terry Pratchett. This is to keep his name alive, and is based on something from his novel, Going Postal.

You can find out more about this here: http://www.gnuterrypratchett.com/

]]>
Tim Mon, 15 Jun 2015 15:47:02 +00:00
The Dashboard https://our.umbraco.org/projects/backoffice-extensions/the-dashboard/ https://our.umbraco.org/projects/backoffice-extensions/the-dashboard/ This is a magic dashboard for Umbraco 7, it's accualy "The dashboard". It will show editors a summery of the latest activites on the website combined with each editors recent files and other useful information.

]]>
Markus Johansson Sun, 14 Jun 2015 09:51:35 +00:00
uCop https://our.umbraco.org/projects/backoffice-extensions/ucop/ https://our.umbraco.org/projects/backoffice-extensions/ucop/ uCop is an Umbraco CMS plugin that helps with website maintenance. The initial version shows breakdown of document types defined in a site together with some other static data, helping the editors and developers see the dependencies at a glance. The aim is to extend uCop to allow dynamic analaysis of the site based on predefined rules, aiding the development and maintenance further. This can be used to evaluate the healt of a site, or to enforce conventions and best practises.

]]>
Ondrej Pialek Mon, 08 Jun 2015 17:18:31 +00:00
Speedy Image https://our.umbraco.org/projects/website-utilities/speedy-image/ https://our.umbraco.org/projects/website-utilities/speedy-image/ Camera to Web. Open Source, Resize, Watermark, Optimize, Cache, Automatic.

1. Install SpeedyImage 2.XX Package

2. Edit your template, where bodyText is your Rich Text Editor.

@Html.Raw(SpeedyImage.Mvc.Go(CurrentPage.bodyText, 0, 0, 600, 800, true, 88, "/media/1003/watermark.png"))

3. Enjoy!


DOCUMENTATION

 

Table of Contents ~ Mvc ~ Manual ~ Cache ~ Umbraco Resizing

MVC

SpeedyImage.Mvc.Go(object html, int height, int width, int maxheight, int maxwidth, bool constrain, int quality, string watermark)

 

@Html.Raw(SpeedyImage.Mvc.Go(CurrentPage.Copy, 0, 0, 600, 800, true, 88, "/media/1003/watermark.png"))

MANUAL

/SpeedyImage.ashx?imagepath=%2fmedia%2f1009%2fimg_20150311_214650.jpg&

height=0&width=0&maxheight=600&maxwidth=800&constrain=True&

quality=88&watermark=%2fmedia%2f1003%2fwatermark.png

CACHE

 

To activate caching, paste the following in your Web.config AppSettings

<add key="SpeedyImage.CacheInterval" value="15" />

 

UMBRACO RESIZING

 

Umbraco will add “style” to your <img> tags.  Disable resizing to use responsive images.

Developer > Datatypes > Richtext editor > Maximum size for inserted images = 0

 

]]>
Jeff Schollaart Mon, 08 Jun 2015 15:31:18 +00:00
Pure Grid Layout https://our.umbraco.org/projects/website-utilities/pure-grid-layout/ https://our.umbraco.org/projects/website-utilities/pure-grid-layout/ This package contains 2 grid layout data types and partial views for the Pure CSS framework.

The GitHub repository contains an example project that demonstrates how to use it:

https://github.com/stvnhrlnd/PureUmbraco

]]>
Steven Harland Thu, 04 Jun 2015 22:51:49 +00:00
Documento https://our.umbraco.org/projects/backoffice-extensions/documento/ https://our.umbraco.org/projects/backoffice-extensions/documento/ Every website concludes with the tedious task of producing documentation for content editors. Documento makes this a little bit easier. 

Assuming you have been providing descriptions for Document types and Properties along the way, Documento installs a dashboard tab to the Umbraco back-office, listing the document types and properties, alongside their descriptions and data types. 

To avoid listing helper document types or properties, only those with Descriptions will be displayed.

 

 

 

 

 

]]>
Theo Thu, 04 Jun 2015 13:20:39 +00:00
LINQ To Examine https://our.umbraco.org/projects/developer-tools/linq-to-examine/ https://our.umbraco.org/projects/developer-tools/linq-to-examine/ What is Umbraco.Examine.Linq?

This project allows you to query the Lucene indexes using LINQ based on your own classes. This project comes with a basic Result class which allows you to use this straight out of the box.

Code example

Lets start with some code examples. Say, I want to get all words that contains "umbraco" and it has to be a text page. This is how the code would look:

@using Umbraco.Examine.Linq
@using Umbraco.Examine.Linq.Extensions

var index = new Index<Result>();
IEnumberable<Result> results = index.Where(c => c.Name.Contains("umbraco") && c.NodeTypeAlias == "textpage").ToList();

Or alternatively,

@using Umbraco.Examine.Linq
@using Umbraco.Examine.Linq.Extensions

var index = new Index<Result>();
IEnumberable<Result> results = (from r in index
                where r.Name.Contains("umbraco") && r.NodeTypeAlias == "textpage"
                select r).ToList();

Above, we are creating a new index, setting the type we wish to query. See Index constructor section for more information on how you can change the target of your search. By default, the "ExternalSearcher" is used. Anyway, then we perform the search using Where, and ToList() at the end that executes the query.

Installation

Install via Nuget using the command below. Then add the config manually in step 2.

Step 1:

PM> Install-Package LINQToExamine

Step 2 (I will automate this as part of step 1 asap):

Instert in > Configuration > Compilation > Assemblies

<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

<add assembly="System.Linq.Expressions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

Index Constructor - changing the default

ConstructorDescription
Index(string searcherName") Set which Umbraco Searcher to use (see UmbracoSettings.config)
Index(ISearcher searcher) Allows you to set up and target your own Lucene index. The query is passed to you to execute. All you need to do is implement the ISearcher interface.

How to use your own custom classes?

using Umbraco.Examine.Linq.Attributes

[NodeTypeAlias("BlogPost")] //completely optional!!!
public class BlogPost
{
    [Field("nodeName")]
    public string Name { get; set; }
    [Field("content")]
    public string Content { get; set; }
    [Field("summary")]
    public string Summary { get; set; }
    [Field("blogDate")]
    public DateTime BlogDate { get; set; }
    [Field("createDate")]
    public DateTime CreateDate { get; set; }

    public Examine.SearchResult Result { get; set; } //will automatically set the result from Examine
}

There are two attributes being applied. The NodeTypeAlias attribute will automatically add the filter to the search, so you will only see results of that type. The Field attribute declares that name of the field in the index, if nothing is specified, it will default to the property name. The data will be mapped directly from the Examine SearchResult into your custom class. If you specify a property with the type Examine.SearchResult, it will automatically assign the result to your class, if you wanted access to scores etc.

So, say you wanted to find all BlogPosts' where the summary contains the terms "fishing" or "cod". The query will look like this:

@using Umbraco.Examine.Linq
@using Umbraco.Examine.Linq.Extensions

var index = new Index<BlogPost>();
IEnumerable<BlogPost> results = index.Where(c => c.Name.ContainsAny("fishing", "cod")).ToList();

Expression logic

string logic:

Extension method / operatorDescriptionExample
== (operator) Whether the field contains the value r => r.Name == "foo"
!= (operator) Whether the field does not contains the value r => r.Name != "foo"
Contains(term) Whether the field contains the value r => r.Name.Contains("foo")
Contains(term, fuzzy) Whether the field contains the value with Fuzzy enabled r => r.Name.Contains("foo", 0.8)
ContainsAny(term) Whether the field contains any of the values r => r.Name.ContainsAny("foo", "bar", "etc")
ContainsAll(term) Whether the field contains all of the values r => r.Name.ContainsAll("foo", "bar", "etc")

All these support NOT (!)

bool logic:

Extension method / operatorDescriptionExample
== (operator) Whether the field is true or false r => r.UmbracoNaviHide == false
!= (operator) Whether the field is not true or false r => r.UmbracoNaviHide != false

int and double logic:

operatorDescriptionExample
== (operator) Whether the field is equal r => r.Rating == 4
!= (operator) Whether the field is not equal r => r.Rating != 4
< (operator) Whether the field is less than r => r.Rating < 4
<= (operator) Whether the field is less than or equal to r => r.Rating <= 4
> (operator) Whether the field is greater than r => r.Rating > 4
>= (operator) Whether the field is greater than or equal to r => r.Rating >= 4

DateTime logic:

operatorDescriptionExample
== (operator) Whether the field is equal r => r.CreatedDate == date
!= (operator) Whether the field is not equal r => r.CreatedDate != date
< (operator) Whether the field is less than r => r.CreatedDate < date
<= (operator) Whether the field is less than or equal to r => r.CreatedDate <= date
> (operator) Whether the field is greater than r => r.CreatedDate > date
>= (operator) Whether the field is greater than or equal to r => r.CreatedDate >= date

More logic extension methods on the way, to help with ranges.

Boosting

Boosting allows you to boosts results that meet a specific condition. For example, you may want to boost the score for results where the content contains the word "Umbraco". Alternatively, you may want to boost results where the content contains the word "Umbraco" or summary contains "Events". Lets look at implementing both:

First Query: Get results where the name contains the term, and boost where content contains the word "Umbraco"

string term = GetTerm(); //get the search term - your implementation
var index = new Index<BlogPost>();
IEnumerable<BlogPost> results = index.Where(c => c.Name.Contains(term) 
                                              && c.Content.Contains("Umbraco").Boost(10)
                                            ).ToList();

Second Query: Get results where the name contains the term, and boost where the content contains the word "Umbraco" or the summary contains "Event":

string term = GetTerm(); //get the search term - your implementation
var index = new Index<BlogPost>();
IEnumerable<BlogPost> results = index.Where(c => c.Name.Contains(term) 
                                  && (c.Content.Contains("Umbraco") || c.Summary.Contains("event")).Boost(10)
                                ).ToList();

Wildcard Searches

Wildcard searches are easy to do. Just specify the * in the text you are querying.

For example:

@using Umbraco.Examine.Linq
@using Umbraco.Examine.Linq.Extensions

var index = new Index<Result>();
IEnumberable<Result> results = index.Where(c => c.Name.Contains("umbr*") && c.NodeTypeAlias == "textpage").ToList();

New in 1.0.4

  • Ability to query on DateTimes, ints and doubles.
]]>
Craig Noble Mon, 01 Jun 2015 02:16:42 +00:00
Mr N Picker https://our.umbraco.org/projects/backoffice-extensions/mr-n-picker/ https://our.umbraco.org/projects/backoffice-extensions/mr-n-picker/ Mr N Picker is a Multi-Root Node Picker for Umbraco 7, built as a part of Project Yoxo.

Why would I want multiple root nodes in a MNTP?

This package allows a developer to create a clean tree structure based on multiple root nodes, without having to select a shared parent node or include items that aren't relevant to the content editor.

Getting Started

This package was built against Umbraco 7.2.1, but is supported across all current versions of Umbraco 7.

Installation

Mr N Picker is available from Our Umbraco, NuGet, or as a manual install directly from GitHub.

Our Umbraco repository

You can find a downloadable package, along with a discussion forum for this package on the Our Umbraco site.

NuGet package repository

To instal from NuGet, run the following command in your instance of Visual Studio.

PM> Install-Package MrNPicker 

Manual installation

Just download and add the package to your App_Plugins folder. When you open your instance of Umbraco you will be able to create a new data type based on Mr N Picker.

Using Mr N Picker

Using Mr N Picker is simple. Set up a new data type and select the Mayfly.MrNPicker type from within Umbraco's Developer section. After your selection, you will be presented with the following options for your data type, which are as follows:

  • Root nodes: A MNTP that allows you to select one or more roots for your multi-root node picker.
  • XPath: A collection of XPath expressions to select a number of roots
  • Allow items of type: A comma-delimited list of document type aliases to filter the resulting node tree
  • Minimum number of items: The minimum number of items the editor can add to a multi-root node picker. This can be left empty if no minimum constraints are required
  • Maximum number of items: The maximum number of items the editor can add to a multi-root node picker. This can be left empty if no maximum constraints are required
  • Merge roots: Merges the roots in the rendered tree if a selected root is the child of another selected root. This avoids duplication in the tree.

Once this data type is set up, you will be able to add the data type as a property to a document type. When an instance of that document type is created/accessed, the editor will see the resulting multi-root node picker with their rendered tree.

Contribution guidelines

To raise a new bug, create an issue on the GitHub repository. To fix a bug or add new features, fork the repository and send a pull request with your changes. Feel free to add ideas to the repository's issues list if you would to discuss anything related to the package.

Who do I talk to?

This project is maintained by Mayfly Media. If you have any questions about this project please contact us through the Mr N Picker forum on Our Umbraco, or by raising an issue on GitHub.

Many thanks

Additional thanks to Janusz Stabik and Declan Burns for providing the necessary time and resources for the Mayfly team to work on this project.

License

Copyright © 2015 Mayfly Media Ltd, and other contributors

Licensed under the MIT License.

]]>
Mayfly Media Wed, 20 May 2015 11:59:05 +00:00