How to add a menu items for tiles menu in W10 - xaml

How to add a menu items for tiles menu in W10 using UWP? Preferably through xaml

Feature allowing custom menu items is called jump lists and it works both on live tiles and on the task bar buttons. The best way to learn about it is from the official sample on GitHub and from Docs.
A very simple jumplist could be created like this:
var jumpList = await Windows.UI.StartScreen
.jumpList.LoadCurrentAsync();
jumpList.Items.Clear();
JumpListItem sampleItem = JumpListItem
.CreateWithArguments("item", "Do something");
jumpList.Items.Add(sampleItem);
If you want to display recently opened files (as is the case in the screenshot), you must create a file extension association for your app and store accessed files in the Most recently used list. This can be found here and is managed using the Windows.Storage.AccessCache.StorageApplicationPermissions.MostRecentlyUsedList class.

Related

Integrate search bar (like in product controller for packs) in custom module controller

I'm facing an issue when I'm try to integrate the same search bar as the one in product controller for product packs.
(this one)
I've been scrolling through the whole product controller but didn't find where the search bar is rendered.
I found few parts nearly related of the input in product.js, but nothing really interesting.
What I'm trying to do is implement the same search bar with product suggestions, I will find out later how to "save" it like in product controller when you create a pack.
Backoffice product page had been migrated in Symfony, form is built in a twig template inside:
src/PrestaShopBundle/Resources/views/Admin/Product/ProductPage/Panels/essentials.html.twig
src/PrestaShopBundle/Resources/views/Admin/Product/form.html.twig
While JS handler is here :
admin/themes/new-theme/js/product-page/product-search-autocomplete.js

Sensenet: Pagination on Document Library

It is possible to define pagination on document library?
I have a document library with more that 10000 documents... when I open the library occurs an timeout.
Actually SenseNet already does this! They just don't deliver it in the standard list control. If you open up the PRC and navigate to /Root/IMS/BuiltIn/Portal you'll see a list control with paging. The code can be found at /Root/Global/renderers/UserExploreGrid.ascx as User Control portlet. You can copy the code and change it to meet your needs.
Our company prefers to create User Control portlets and use Datatables with calls to the SenseNet OData API using skip and top to deliver pages.
Finally, given that SenseNet Content is stored as a tree structure (in SQL!), you can move the Content after creation so that data is organized hierarchically. A common solution is to take the first letter of the DisplayName and create a sub-folder from that letter, thereby reducing the number of items at a single node.
Here's what the paging looks like:
The short answer is no. Right now there isn't a built in functionality for that.
The long answer is that you can make a pagination yourself. One of the core member of sensenet made a grid where you can use pagination. It won't work with the current free to use releases because they lack the js files she used. But the idea behind it, is using a custom view. Which you can achieve by adding a system folder named Views under a the Document library and adding your custom view there.
You can use this grid for Explore, just follow these steps:
Go to the Explore action page, and switch editor mode on the PRC.
Place a ClientContext portlet (this can find under the Portlets->Application section in the portlet picker dialog) to the Wide column. Set portlet (client context porlet) properties, Apparance to None. It is a technical portlet, which allow get the CurrentContext in javascript. This is a very important element to work with this grid. The Grid use the client context.
Place a UserControlPortlet (In the portlet picker, Portlets->Application section) to the Wide Column.
Set portlet properties:
4.1. Portlet title: <%$ Resources: PortletTitles, Items%>
4.2. User Control path: /Root/Global/renderers/UserExploreGrid.ascx
Checkin Page modification on the PRC.
Enjoy your pageable explore portlet.
Keep in mind that this grid is specifically designed for users, so they will miss actions in the top menu. These must be handwritten. Then I suggest you copy the UserControl ( /Root/Global/renderers/UserExploreGrid.ascx)
and then put the action list on it . You can read more info about action list here: http://wiki.sensenet.com/ActionList
Br,
maros

Image slider link to internal or external page on Sitefinity

(Sitefinity 6.x)
I am trying to create an image slider where each image in the page links to an internal or external page. I created a separate library for all the images that I want to show on the slider then using custom MVC widget I display the images in a slider.The problem that I have is there is no place in the image where I can link the image to open an existing internal page or external website.
Is there a way to add a properties to the original Image properties? so that users can select a page (using some sort of page selector just like in the navigation widget) or type in external page to link. If that is not possible, could you give me some ideas how to implement this?
I've been creating image rotators using Module Builder in Sitefinity. What you could do is go to Administration -> Module Builder -> Create a Module, call it Image Slider, call the content type Slide. Add a couple fields, for the first call it Image and select Media for the type, this will use an image selector for the interface, then add another field called Link and use Short text for the type, this will hold the url. Unfortunately, Sitefinity doesn't include a Page Selector control as an available field yet so a text field will have to do. Save and activate your module, it will show up under Content -> Types of Content. Go ahead and add a few slides. Sitefinity has created a couple of widgets when you created the module, so if you edit a page, you'll see them under the "Content" widget section, probably at the bottom. Drag it on the page and set it to use the list template. Now open up the Sitefinity Explorer window in their Thunder Visual Studio plugin, under Common Widget Templates, you'll see an Image Slider folder, you'll want to edit the list template since you'll be outputing all the slides into some carousel markup or something. From here you can use the default Sitefinity image control and bind the link to a hyperlink that wraps the image control, this will link each image to whatever is in that field.
Hope that helps.

SharePoint: Programmatically moving pages and subsites on the current navigation menu

Does anyone know how to programmatically move/order the pages and subsites that appear in the Current Navigation when you have the Include subsites and include pages options ticked/enabled?
Background
I have written a class (in c#) which imports content into a new SharePoint site. The newly created subsites and pages all show on the Current Navigation menu as expected, but in the order they were created (I assume). I need to manually sort the pages on the menu so that they appear in the same order as the existing non-SharePoint site.
Issue
The PublishingWeb.Navigation.CurrentNavigationNodes collection does not contain any SPNavigationNode items for the pages and subsites that are automatically displayed on the Current Navigation menu, so I can't use this collection.
I know that to hide a particular page from the menu, you have to update a web property as follows:
web.AllProperties["__CurrentNavigationExcludes"] += page.UniqueId.ToString() + ";";
web.Update();
Is there something similar I can use to order the pages?
Set the Ordering to manual
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.orderingmethod.aspx
Check out the follow up article on this: http://www.thekickboard.com/archive/2010/09/01/programmatically-setting-navigation-order-in-a-moss-publishing-site.aspx
Is this sort of what you are looking for:
http://www.thekickboard.com/archive/2010/09/01/programmatically-setting-navigation-order-in-a-moss-publishing-site.aspx

SharePoint 2010: custom masterpage for programmatically created subsites

What’s the best way to add a custom masterpage to a subsite that is being created programmatically in a feature event receiver? Each of these 50 subsites gets its own “_catalogs/masterpage”, so I have a feeling that Elements.xml for the root-site’s Module/Elements.xml is out. More feature receiver code? PowerShell post-deployment processing?
Is this going to be 50 copies of the same Master Page?
If not, I can't really picture how the Master Page will be specially made using code, but also a Feature Module element is certainly out.
But if it is 50 copies of the same file, you could deploy the Master Page to the Gallery one time using a Feature Module element. Then in your Feature Receiver, make a copy of that file with a new name in the Master Page Gallery and attach it to your website:
web.MasterUrl = "_catalogs/masterpage/custom_v4.master";
web.CustomMasterUrl = "_catalogs/masterpage/custom_v4.master";
web.Update();
You might want to think about creating
custom site definition.
You have following choices to set master page for the site:
1) Using Sharepoint Browser UI (from Site Settings page)
2) Using Custom site definitions
3) Programmatically
4) Using SharePoint Designer
Looking at your scenario, no 3 is an option. You may want to do it in the Feature Receiver itself.