Tony Brookus Posted December 24, 2018 Share Posted December 24, 2018 Anyone know a way to default the apps view in Storefront 1811 to Categories rather than All? The method that worked for Storefront 3.X no longer works. Thanks, Tony Link to comment Share on other sites More sharing options...
Sam Jacobs Posted December 24, 2018 Share Posted December 24, 2018 Do you want the Apps-Categories view to be the first view the user sees upon login? Link to comment Share on other sites More sharing options...
Tony Brookus Posted December 24, 2018 Author Share Posted December 24, 2018 Correct. Basically default to Categories rather than All under Apps. Link to comment Share on other sites More sharing options...
Sam Jacobs Posted December 24, 2018 Share Posted December 24, 2018 Try putting this into script.js: function categoriesDelay() { $('#categoriesTabBtn').click(); } CTXS.Extensions.afterDisplayHomeScreen = function (callback) { CTXS.ExtensionAPI.changeView('store'); window.setTimeout(categoriesDelay,250); callback(); }; 1 Link to comment Share on other sites More sharing options...
Tony Brookus Posted December 24, 2018 Author Share Posted December 24, 2018 That got it. Thanks! Link to comment Share on other sites More sharing options...
Sam Jacobs Posted December 24, 2018 Share Posted December 24, 2018 Tony, My apologies ... the extension afterDisplayHomeScreen() does not take a callback. While the above will still work, the technically correct version is (without any callback): function appsDelay() { $('#categoriesTabBtn').click(); } CTXS.Extensions.afterDisplayHomeScreen = function () { CTXS.ExtensionAPI.changeView('store'); window.setTimeout(appsDelay,250); }; Sam Link to comment Share on other sites More sharing options...
T70915 Posted January 14, 2019 Share Posted January 14, 2019 Hi! How can i select the "Uncategorized" category by default? Link to comment Share on other sites More sharing options...
Sam Jacobs Posted January 14, 2019 Share Posted January 14, 2019 To select the Uncategorized category by default (this will only work if it ends up to be the last category in the group): function changeToUncategorized() { $('.appFiltersItem-Text').last().click(); } function appsDelay() { $('#categoriesTabBtn').click(); window.setTimeout(changeToUncategorized,500); } CTXS.Extensions.afterDisplayHomeScreen = function () { CTXS.ExtensionAPI.changeView('store'); window.setTimeout(appsDelay,250); }; 1 Link to comment Share on other sites More sharing options...
T70915 Posted January 15, 2019 Share Posted January 15, 2019 Thank you very much Sam! Works as expected. Even in german. Link to comment Share on other sites More sharing options...
Sam Jacobs Posted January 15, 2019 Share Posted January 15, 2019 1 Link to comment Share on other sites More sharing options...
Sandy Williams Posted February 5, 2019 Share Posted February 5, 2019 Hi Sam, is it possible to have it default to the Favorites view but if a user clicks the Apps that they are brought to the Category view instead of All? That's how I have it configured in 3.16. Link to comment Share on other sites More sharing options...
Roel Niesen Posted June 10, 2019 Share Posted June 10, 2019 Hi, To go future on this toppic. I'm using storefront 1903. Is there a way to publish all categorys only as a folder symbole (like before). Now I see the categorys but also all apps below. Kind regards, Roel Niesen Link to comment Share on other sites More sharing options...
Marko Juutinen1709151828 Posted September 27, 2019 Share Posted September 27, 2019 Same question here as Roel has. Link to comment Share on other sites More sharing options...
Erwin Vos Posted October 11, 2019 Share Posted October 11, 2019 I have also the same question. Publish the categories as a folder in stead off the new look Link to comment Share on other sites More sharing options...
Roel Niesen Posted October 11, 2019 Share Posted October 11, 2019 Hi, I used this code like metion before: For me this is ok for the web users, but for receiver and ipad/apdroid, this isn't workign yet. We have a minimum off apps so we don't want to choose the apps and gave them all, but we should be able to organise them in web, receiver and ipad/android apps. function changeToUncategorized() { $('.appFiltersItem-Text').last().click(); } function appsDelay() { $('#categoriesTabBtn').click(); window.setTimeout(changeToUncategorized,500); } CTXS.Extensions.afterDisplayHomeScreen = function () { CTXS.ExtensionAPI.changeView('store'); window.setTimeout(appsDelay,250); }; CTXS.Extensions.onViewChange = function (viewName) { if (viewName == 'store') { // window.setTimeout(changeToUncategorized,250); //} // CTXS.ExtensionAPI.changeView('store'); window.setTimeout(appsDelay,250); } }; Link to comment Share on other sites More sharing options...
Eric Gioglio Posted January 8, 2020 Share Posted January 8, 2020 We leveraged Sam Jacob's code from 1/14/2019 to come up more surefire method to select the "Uncategorized" category, or any category of your choosing. This appears to be working OK in StoreFront 1912 LTSR. function changeToUncategorized() { for (var k=0;k<$('.appFiltersItem-Text').length;k++) { var objCategoryLink = $($('.appFiltersItem-Text')[k]); // Locate link name specified in the if statement below, and then click it if (objCategoryLink.text().trim().toLowerCase().indexOf("uncategorized (") == 0) { objCategoryLink.click(); } } } function appsDelay() { $('#categoriesTabBtn').click(); window.setTimeout(changeToUncategorized,250); } CTXS.Extensions.afterDisplayHomeScreen = function (callback) { CTXS.ExtensionAPI.changeView('store'); $(document).ready(function() { window.setTimeout(appsDelay,250); }); } On 1/14/2019 at 12:48 PM, Sam Jacobs said: To select the Uncategorized category by default (this will only work if it ends up to be the last category in the group): function changeToUncategorized() { $('.appFiltersItem-Text').last().click(); } function appsDelay() { $('#categoriesTabBtn').click(); window.setTimeout(changeToUncategorized,500); } CTXS.Extensions.afterDisplayHomeScreen = function () { CTXS.ExtensionAPI.changeView('store'); window.setTimeout(appsDelay,250); }; Link to comment Share on other sites More sharing options...
Sam Jacobs Posted January 8, 2020 Share Posted January 8, 2020 Here's the "official" Citrix blog version (which works pretty much the same way): https://www.citrix.com/blogs/2019/09/03/how-to-land-on-the-categories-view-in-storefront-1811/ Link to comment Share on other sites More sharing options...
Eric Gioglio Posted January 8, 2020 Share Posted January 8, 2020 I'd looked at this earlier, but it only expands the Categories menu. It doesn't select/display the desired category apps. Are getting a different result? 2 minutes ago, Sam Jacobs said: Here's the "official" Citrix blog version (which works pretty much the same way): https://www.citrix.com/blogs/2019/09/03/how-to-land-on-the-categories-view-in-storefront-1811/ Link to comment Share on other sites More sharing options...
Sam Jacobs Posted January 8, 2020 Share Posted January 8, 2020 I hadn't actually tested his method to see if it worked … I'm using the method you quoted above. Link to comment Share on other sites More sharing options...
Eric Gioglio Posted January 8, 2020 Share Posted January 8, 2020 Here's and enhanced version that allows you to specify any desired child category via a variable. Thanks again to Sam Jacobs for most of the code used here: var defaultCategory = "Uncategorized"; // Display desired "Categories" apps by default (part 1 of 3) function changeToUncategorized() { for (var k=0;k<$('.appFiltersItem-Text').length;k++) { var objCategoryLink = $($('.appFiltersItem-Text')[k]); // Locate the desired "defaultCategory" variable name, and then click it if (objCategoryLink.text().trim().toLowerCase().indexOf(defaultCategory.toLowerCase() + " (") == 0) { objCategoryLink.click(); } } } // Display desired "Categories" apps by default (part 2 of 3) function appsDelay() { $('#categoriesTabBtn').click(); window.setTimeout(changeToUncategorized,250); } CTXS.Extensions.afterDisplayHomeScreen = function (callback) { // Display desired "Categories" apps by default (part 3 of 3) CTXS.ExtensionAPI.changeView('store'); $(document).ready(function() { window.setTimeout(appsDelay,250); }); } Link to comment Share on other sites More sharing options...
infra producao Posted December 11, 2020 Share Posted December 11, 2020 @Sam Jacobs , this customization stopped working on 1912 LTSR CU02 ? Link to comment Share on other sites More sharing options...
Sam Jacobs Posted December 11, 2020 Share Posted December 11, 2020 I'll try to spin up a CU02 version over the weekend to check it out. Link to comment Share on other sites More sharing options...
Scott Rosendahl1709160942 Posted January 11, 2021 Share Posted January 11, 2021 Appears that it's broke in 1912.CU2. We've tested and not able to get it to function as is expected. 2 Link to comment Share on other sites More sharing options...
Shiv Sidhu Posted January 29, 2021 Share Posted January 29, 2021 Hi All, I was using the "enhanced version" posted by fcoa last year and it was working well with 1912 CU1, except our user base prefers the folders so we're testing out 1912 CU2 now, for which the script does not seem to work as well. If we choose the Collapsed View for Categories, we get the desired folders view but no child category is selected on the landing page. If we select the Expanded View instead, we get the child category expanded however the top navigation for Categories is hidden unless you click on it manually. Ideally, we get the folder view with the category defined in the script already selected/expanded (same as we had in pre-1811 versions). ** we've already changed the categoriesTabBtn to folderHierarchyFilterBtn... thanks for that tip! However, it still does not achieve the desired view. Any additional tips would be greatly appreciated. We're going to open a ticket with Citrix as well. Link to comment Share on other sites More sharing options...
Asmir KAZAZOVIC Posted April 28, 2021 Share Posted April 28, 2021 Hi all, in regards of landing to Categories View with Storefront 1912 CU2 there is an example of such customization in online documentation (edocs) at this link https://docs.citrix.com/en-us/storefront/1912-ltsr/manage-citrix-receiver-for-web-site/unified-receiver-experience.html (i think originally posted in Citrix Blog by Richard Hayton https://www.citrix.com/blogs/2015/08/25/citrix-customization-cookbook/ using the following JS code: $('#customScrollTop').append('<div class="whitespace"></div>'); CTXS.Extensions.onViewChange = function(view) { if (view == "store") { $('.whitespace').height(5000); window.setTimeout(function() { CTXS.ExtensionAPI.navigateToFolder("/"); $('.whitespace').height(0); }, 1); } }; At first using the code as such It didn't work for me but then i modified the first line to $('#customScrollTop').append('<div class="whitespace"></div>'); and I added 10ms delay (instead of 1 as described in the text, so i ended up with something like this: $('#customScrollTop').append('<div class="whitespace"></div>'); CTXS.Extensions.onViewChange = function(view) { if (view == "store") { $('.whitespace').height(5000); window.setTimeout(function() { CTXS.ExtensionAPI.navigateToFolder("/"); $('.whitespace').height(0); }, 10); } }; then it worked. I'm not a JS guy and it surely can be done in better way, but if it can help someone... cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now