How to set default open tab in path selector modal window

Andrew Huchko asked on April 4, 2017 16:53

When I press select on Path selector form control, I redirected to tab, which I used last time for selection.

I want to set some default tab for selection, not my last selection tab.

There are three tabs: content, media, web.

I created copy of path selection form control and tried to add query parameter like : tab=web

It doesn't work.

I have read some documentation about that : https://devnet.kentico.com/docs/4_1/devguide/index.html?dialogs_configuration.htm - I read that :

The dialog remembers the selection setup on last insertion for each user. This means that when a user opens the Insert image or media or Insert link dialog, all of the following are in the same state as on last insertion:

• selected tab • selected view mode

Is it possible to set some default tab for this modal dialog?

I rewrote user settings and it doesn't help me.

Recent Answers


Trevor Fayas answered on April 4, 2017 17:36

Pretty much anything is possible. Taking a look, when i hit the button, it brings up a Modal with this url:

http://kentico10.avastonetest.com/CMSFormControls/Selectors/InsertImageOrMedia/Header.aspx?output=url&pagetypes=All&attachments_hide=1&documentid=1202&parentid=198&content_site=BlankSite&content_userelativeurl=True&content_culture=en-US&editor_clientid=m_c_webPartProperties_form_LinkUrl_txtPath&siteid=2&hash=fe391d5043b1a893919f5c53fcec2cdc796222733dbd879a8f7adc1a21ce4bf1

After making a default selection of Media Libraries, i close, then re-open to a modal of this url

http://kentico10.avastonetest.com/CMSFormControls/Selectors/InsertImageOrMedia/Header.aspx?output=url&pagetypes=All&attachments_hide=1&documentid=1202&parentid=198&content_site=BlankSite&content_userelativeurl=True&content_culture=en-US&editor_clientid=m_c_webPartProperties_form_LinkUrl_txtPath&siteid=2&tab=libraries&hash=66c432b6e413594204f9d7b3bbcc5e234a99307aeec2a7d53faba0e2211e1a8e

Notice the tab and the hash are different.

The hash i believe is part of the Modal UI class, i looked into at one point, and i believe it's a hash of all the parameters for security purposes. You may be able to look into how it's calling the Modal and set the tab...but it will definitely be a challenge!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.