Sitecore field for selecting multiple files from media library with the ability to upload files - sitecore

I'm looking for something that allow content editors to select multiple files from the media library, which will be listed in a rendering. They also need to be able upload files and to search. It has to work in the Page Editor (named Experience Editor in version 8).
What I have have considered so far:
A bunch of File fields - but I don't know how many files the editor need to select at most, and having something like 20 similar fields seems bad.
Using a field that supports multiple items like a Treelist with the datasource set to the Media Library allows the user to select files in an acceptable way but not uploading. I tested adding one File field just for the upload function, but was not really satisfied.
Notes:
Currently using Sitecore 7.5 but moving to 8 in a few days, so a solution working in Sitecore 8 is preferred.
I have asked the Sitecore support too and will update here if I get useful answers.

And the winner is.... the answer from Sitecore support:
In the Email Experience Manager module there is a field called "File List".
The image shows the dialog in Sitecore 8 and the field itself (below). It has search, supports multiple files and upload. It stores the value as pipe-separated GUIDs (just as similar fields like Treelist).

The Field Types Module on Sitecore Marketplace includes "Visual List" and "Carousel" custom field types which may provide what you need. I have used this in the past and found it to work well, though I'm not sure if it's compatible with Sitecore 8. As I remember, I don't think they provided the option for uploading new media from the field.

An alternative solution is to use a placeholder and a file component with a DataSource.
Give the component a standard File Field. So upload is possible.
But for every new file the editor must add a new component to the placeholder with the page editor. This is with a lot of files more work for the editor. But a standard solution. (and the ability to personalize the files with the rules engine)

Related

Sitecore 8 - Adding images, callouts and videos in RTF field

I am working on a requirement in Sitecore 8 according to which there is a Rich text field and the content author can not only add html data but can also add predefined call outs/renderings/images directly in page editor mode.
Is there any way I can achieve this ? Please help.
We achieve this using Components in Experience Editor. As you create pages, we created components for Image, Video, Text and any Callouts. You will be able to drop components on the page based on specified placeholder settings. In my opinion it is the cleanest approach.
It sounds like 'snippets' is the way to go for you. There are some posts on the web about how to add snippets to RTF fields:
http://davetayls.me/blog/2011/02/07/adding-rich-snippets-to-sitecore-rich-text-editors/
http://sitecoreblog.blogspot.ca/2010/11/richtext-editor-add-code-snippet-or.html
http://learnsitecore.cmsuniverse.net/en/Editors/Articles/2009/06/How%20to%20use%20snippets.aspx

Where to create the Articles in Sitecore?

I'm trying to understand the best approach to create article items in my sitecore 7.2 project.
Basically I'm considering 2 options:
1 - Create an article as a page;
2 - Create an article as a Site Data Item.
1 - Create article pages under a given page (i.e. My Articles). This way each article would have a specific URL out of the box, easier to understand in Content Authors' point of view;
2 - Have a specific folder (i.e. Article Folder) under Site Data. This way we don't need to have a page for each article - I was thinking to have a single Article page that would render the article fields. However this would require more work in terms of URLs, navigation, etc.
Is there any other ideas? Am I missing something? I was also having a look at Buckets...
Thank you
I'm going to disagree with Marek and recommend you opt for option 2.
Storing your articles in folder under a Data node allows those items to be datasourced. This is the principle Sitecore was built on. You can then surface those articles in a number of interesting ways via Widgets such as Promo Panels, prompting the user to click through to read about the article without duplicating its data and requiring Content Editors to manage data multiple times.
It even supports multiple sites, so the Articles can be used in other sites you may add to your Sitecore instance in the future.
As you state it will require extra work in terms of Urls and Navigation but it can be achieved via Sitecore's Wild Card Item and you an even use a great open sourced Module from Sitecore's Marketplace to complete 90% of the work for you. See links below for more information.
You can still implement Marek's point of applying Presentation Details once on the Standard Values of the Wild Cart Item you create. If you are using Sitecore 7 and above you can store all your articles in a Bucket so if you have lots of articles they are stored and searchable in a meaningful way.
http://www.sitecore.net/learn/blogs/technical-blogs/getting-to-know-sitecore/posts/2011/09/wildcards-and-data-driven-urls.aspx
https://marketplace.sitecore.net/en/Modules/Wildcard_module.aspx
In a standard one instance setup the easiest implementation is to create articles as pages.
In Sitecore you want to limit the items in a folder to 100 or less which is best practice to keep the content editors experience optimal.
This then leads you needing a folder structure and a couple options:
Manually maintain a folder structure for your articles. For example articles/year/month/day. This gives your editors the most control over the folder structure and allow them to navigate the articles in a more traditional way via a visible folder structure.
Use a bucket which automatically generates the folder structure and hides this complexity from the content editor. This takes the manual folder creation and maintenance away from the content editor and are automatically generated based on the configuration you set out for your bucket. The folders wont be visible to the content editor so they will be forced to search in the bucket for any articles rather then navigate the folders.
Use the shared source News mover module (https://marketplace.sitecore.net/en/Modules/News_mover.aspx). This takes a different approach to the above. It works via a traditional folder structure however it generates folders and moves the item on save based on the date field in the article. So the news mover handles the generation of folders however you will still need to check your not exceeding 100 items per folder again for performance when opening folders with large amounts of items.
With all solutions you must still consider the URLs for your articles as they will include the folder structure by default. This is not always acceptable. I prefer to remove the folder structure from the URL. For this you need to create a custom linkProvider and a custom HttpRequestProcessor. Firstly the linkprovider allows you to ensure the new URL is always created and displayed in your site as you want. Next the HttpRequestProcessor ensures that when navigating to the shortened URL Sitecore recognises it as a valid URL and presents the correct page.
By excluding the folder structure from the URL it also adds the additional benefit that the URL is not dependent on the structure. This means editors can change that folder structure and not need to create redirect items to ensure SEO rankings or users bookmarks are not lost.
The cleaner data model is to use the wildcard approach for the URLs and centralize the storage of articles data in a bucket of datasources. This will give you optimum performance and reuse of the data.
However, this isn't how an author thinks about their website. When they use the system, they tend to navigate to the area where they would view articles and try to create a new one there. Authors tend to think in 'pages', so try to hide whatever data model you are using from them and give them the ability to edit the page with Experience Editor.
Some developers try to optimize too far and forget that the authoring experience is likely the most important piece of the delivered solution. The author doesn't care how efficiently you stored the data, only that they can edit it easily and publish efficiently. Whatever model supports that for your author base is how you should implement it.
My recommendation is a page-based approach where the author creates the URL structure with folders and items, something they understand. Then, if you really need to, you can have the primary article data be a datasource-driven component on the page. The user gets to use all the tools they are familiar with (Experience Editor,preview navigation) but you can still store the raw data in a centralized folder. You could then theoretically swap out the article data using DMS rules, or hide information based on authentication or membership status.
Go with approach 1: article is a page.
Define all your presentation details on Article Page template __Standard Values. All new articles will get them. And you can change some of the presentation details for your chosen articles if you want.
If you know that you'll have lot of articles, think about year/month/day folder structure, e.g. articles/2015/06/12.
Approach 2 doesn't give you anything - you still need to have an item for every article. And as you wrote, it would require additional coding which is not required.

Search tags/facets in Sitecore Item Buckets

I'm looking to use the Sitecore Item Buckets package from Shared Source since I needed faceted search functionality and it makes sense to use the built in functionality rather than writing by own Lucene.Net search.
Sitecore Item Buckets
I'm having trouble with the search, or maybe I am reading the documentation wrong.
According to the documentation in section 2.2.3 & 3.1.3 I just need to mark a field as "Is Facet" and my filter will show in the search results.
I've also defined a tag field on the template and changed the Tag Parent field in "/sitecore/system/Modules/Item Buckets/Item Buckets Settings" to point to correct folder. This is working correctly, I can apply a set of tags to an item and search from the Bucket UI using "tag:CSharp" and it brings back the correct results, but again there is no filter shown in the list. I've rebuilt the bucket indexes in all cases.
Am I missing something? Should these show up in the list automatically, do I need to change some settings or provide my own implementation?
Screenshot
This is all within the Buckets Client UI, I haven't started writing any code yet, and on a clean install of Sitecore 6.5 (update-5/rev. 120706).
I'm not sure the documentation wording around this is entirely clear at the points I've mentioned. If you read further down the document though, section 4.3:
Item Buckets ships with 5 different types of faceting.
Templates
Fields
Dates
Locations
Authors
If you would like to introduce your own faceting categories then you only need to implement the IFacet interface.
There is an example of IFacet implementation in the documentation, or use dotPeek to look at the implementations of the existing Facets.
You also need to add an item to Sitecore: /sitecore/system/Modules/Item Buckets/Facets

Sitecore 6 WFFM: How to customize reports?

I have a few fields that I don't want to appear in the report. Is there a way to hide them completely (not even show the column header for these fields)?
I tried to create my own ISaveAction with the intent to filter out those fields before they get saved to the DB, but even if they don't appear in the AdaptedResultList that is sent to the DataManager.InsertForm the columns associated to these fields still appear in the reports.
Out of the box functionality, the answer is that if you mean one of the reports in the Form Reports area of WFFM, you most likely can, depending on the report. If you mean one of the reports that you can see a "Design" button on top when you view it, then you know that it's using the report that is configured in one of the .mrt files in your website directory in this path:
Website\sitecore modules\Shell\Web Forms for Marketers\Reports
Editing one of the reports by hitting the Design button will open up the Stimulsoft designer that is built in to Sitecore and you can make changes. You can also download one of the trial clients from the Stimulsoft website and open the .mrt files directly and edit them that way (the interface is WAY nicer than the built in Sitecore one).
A word of caution, however, BACK UP THE FILE FIRST!!! The Stimulsoft interface is picky and easy to break and it's got a learning curve. Once you figure out the basics though, removing a field is cake.

default languages for items and folders in sitecore

I'm working in a multi-site, multi-lingual sitecore project, and from time to time, someone adds lots of content on certain sub-site, fight hours with the publishing and being unable to see the updated content, and eventually realise after a couple of hours that all the input was in the wrong language for the sub-site.
So i'm wondering if there is a way in sitecore to support the following:
a folder (for a sub-site) that supports that after clicking an existing item below it, the language automatically changes to the default language for the site folder
since the language is automatically changed, new items created below that folder will be created in the default sub-site language, unless the user explicitly changes it to something else
If the above is impossible or not supported, an excellent workaround would be to be able to change the language of an item language version (say, i created an english version for a page on a spanish site with all the content in spanish, so i want to tell sitecore that i want to make this version actually the spanish version, without going into copying fields manually in the translate ui
It sounds like you might want to consider a few things:
The Language Fallback Provider - this allows you to have have content fallback from one language to another if it doesn't exist.
A custom extension (maybe an event handler for item:creating or item:created) to Sitecore to switch the context language based on where an editor is creating an item.
Just ideas right now...
An alternative approach would be to work with language read and language write security settings for your content contributors.
If your contributor for your Spanish site should only be adding items in Spanish then configure their access settings so that they aren't allowed to create content in other languages.
If you have a lot of content that has been entered in the wrong language then you can use the Globalization - Export language tool (from the Start menu) to export it to an XML file, manually replace the language tags (this is as simple as a search and replace on "en>" -> "es-ES>" for example) and then reimport it in the new language using the Globalization - Import language tool. Warning though: this WILL overwrite any existing versions.