Jump to content
Welcome to our new Citrix community!

1912 Default to categories view in StoreFront when collapsed


Hocine ABDELMALEK

Recommended Posts

Hello all,

 

Is there a way to land in categories view when the collapsed parameter is applied in StoreFront ?

 

This method mentionned by Matthew Greenbaum at https://www.citrix.com/blogs/2019/09/03/how-to-land-on-the-categories-view-in-storefront-1811/ works fine when the view is extended, but as we change to collapsed view, nothing happens and we still land in all apps instead of categories.

CTXS.Extensions.afterDisplayHomeScreen = function (callback) {
  CTXS.ExtensionAPI.changeView("store");
};

CTXS.Extensions.onViewChange = function (viewName) {
  if (viewName == 'store') {
    window.setTimeout(function () {
      var btn = document.getElementById('categoriesTabBtn'); //Get the categories button.
      btn.click(); //Click the categories button as if we are a user
    }, 1000); 
    //Wait 1 second after we switch tabs to make sure 
    //the view is loaded before we trigger our click.
  }
};

Also found this code here https://discussions.citrix.com/topic/400408-storefront-1811-default-to-categories-view/page/3/ that seems to work with collapsed view but I am a little disapointed by the delay, it' like if you see the action of clicking on the categorie tabs even when changing the 100 delay.

 //Switch to Categories View after logon 


CTXS.Extensions.onViewChange = function (viewName) {

  if (viewName == 'store') {
    window.setTimeout(function () {

    CTXS.ExtensionAPI.navigateToFolder('\\');
    }, 100);
  }
}; 

And as a bonus question ?, how can we change the colors and size of the folders in categories?

 

Thanks a lot.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...