Custom Module Backend Sorting
When can we get Custom Module backend sorting? Will that be in the SP or 5.1 or...?
We have a couple modules with hundreds of records, and the categories linked render as GUIDs, and we can't sort by anything so even if I add a new "field\column" to the data in order to see what it's category is, I can't sort by it.
Related to what Steve has requested, I have created some categories and used them in my Module Builder modules, but when you add them to the "Listing items" screen using backend screen tweaks, they display as Guids, even though it gives the impression that they should be rendered as text. Also, if they had rendered as text instead of Guids, I would be hoping to Search/filter the list by letting the user type in a category in the search box and have it search on the text value of the category and not the Guid.
Thanks.
I'd like to chime in on this too. I'm looking for
1) a way to make fields sortable in the backend
2) make the name of tags display rather than a string of GUIDs on the backend (although it works just fine on the frontend)
and
3) the pager on the backend is behaving strangely -- I have 400+ items and it gets to its last page but shows a number and the elipsis like there's another page, and if you click on that it shows the create-your-first message like there's nothing in the module at all.
Hi,
Additional backend filtering most probably won't be added for the 5.1 release because currently we are changing the way custom content items are displayed in the backend to enable hierarchical content types. We wan't to make sure that the new functionality is behaving correctly and after that we will fine-tune it with features like sorting. However we have logged this as a feature request so that you can vote for it and track its progress.
For the tags and categories that are shown as GUIDs in the columns we also have a pits issue so that you can vote for it. As a matter of fact we tried to fix this bug several times but the solution for it isn't that trivial and will take lots of time and effort. Maybe you have noticed that we don't display taxonomies in the grid view anywhere else in the backend so we need additional implementation.
The problem with pagination in the grid view is fixed in the service pack so upgrading to it should resolve the issue.Kind regards,
Stoimen Stoimenov
the Telerik team
Thanks for the response. I guess that makes sense. I went ahead and voted for the PITS item.
Telerik, any updates about sorting functionality?
Steve, did you find any workarounds?
Thanks,
Denis.
Hi Denis,
There is a detailed blog post how to manually add sorting functionality in the backend grid view
http://www.sitefinity.com/blogs/stefanitacheva/posts/stefani-tacheva-s-blog/2012/10/11/sorting-dynamic-and-content-items-by-title-and-email-in-the-grid
This will sort by any short text field in your module.
Kind regards,
Stoimen Stoimenov
the Telerik team
Hi,
thank you for the response.
I was able to create sidebar widget for sorting functionality (by custom taxonomy).
There were few issues during implementation (Described in this post. Could you please take a look let me know if I did everything correctly?)
I have couple more questions about my custom widget:
1) My widget shows items count for each taxonomy value
clientTemplateBuilderType.Append(@
"<a href="
"javascript:void(0);"
" class="
"sf_binderCommand_filterByTag"
);
clientTemplateBuilderType.Append(@
""
">Title</a> <span class='sfCount'>(ItemsCount)</span>"
);
DefinitionsHelper.CreateTaxonomyLink(
new
Guid(
"8B121C60-692F-45B3-8E87-05D35F696E92"
),
DefinitionsHelper.HideSectionsExceptCommandName,
DefinitionsHelper.ConstructDisplaySectionsCommandArgument(portfolioItemTypesFilterSection.WrapperTagId),
sidebarSection);
Hi Denis,
Yes, since the state (or data) of the widget has been changed, it has to be rebound to update with the latest information.
To customize the link text in the side bar you can implement use the extension method from below code instead of making a call to DefinitionsHelper. Please put this method in a static class and call it with appropriate arguments.
public
static
void
CreateTaxonomyLinkWithTitle(Guid id,
string
commandName,
string
commandArgument, WidgetBarSectionElement sidebar,
string
title =
string
.Empty)
var taxonomyManager = TaxonomyManager.GetManager();
var taxonomy = taxonomyManager
.GetTaxonomies<Taxonomy>()
.Where(t => t.Id == id)
.SingleOrDefault();
if
(taxonomy !=
null
)
var taxonomyTitle = taxonomy.Title;
string
linkText =
string
.IsNullOrEmpty(title) ? taxonomyTitle: title;
var name = taxonomy.Name;
sidebar.Items.Add(
new
CommandWidgetElement(sidebar.Items)
Name = name +
"Command"
,
CommandName = commandName,
CommandArgument = commandArgument,
ButtonType = CommandButtonType.SimpleLinkButton,
Text =
"by "
+ linkText +
"..."
,
WidgetType =
typeof
(CommandWidget)
);
Hi Venkata,
Thank you for the code sample, I will try it.
But how I can rebind custom widget each time master grid updates? That was a question too :). Do you have any examples of this? Please let me know! Thanks.
Hello Dennis,
Can you open a support ticket and send your current solution to us? It would be easier for us to take a look and debug on your solution.
Kind regards,I'm using Sitefinity 6.0.
I'm also seeing the field type "array of guids" being displayed as guids in the grid view of the content type. This is for a related content type. I worked on the edit view but not the grid view.
This is really hurting our project, and may force us to triple our dev effort to build custom modules by hand. Are there any workarounds?? Not sure why it has not been fixed in 6.0...
@Adam,
I feel your pain...I really do, I've been harping on this one since the Guid fields come out as "a thing" :)
The fundamental problem is the module type just links in a Guid\Guid[] field. It doesn't know that that Guid field relates to anything...know what I mean? It has no idea that Guid is storing related data for another dynamic module type or even which one.
Once they can do that, and the UI knows about relationships, it can work (and btw, if you log into your everlive.com account...built with sitefinity...and they have it working very well).