Default position when page application is opened

toru sato asked on January 15, 2018 10:45

Hi,

I am using kentico 10.0.

When opening the page application on the kentico administration screen, is it possible to make the state other than root open by default?

We have confirmed that you can change the default of live site by setting path to [settings] - [web site content] - [default alias path:]
I want to change the default display position of the content tree on the management screen.

Correct Answer

Dragoljub Ilic answered on January 15, 2018 14:52

Hi,

If you want all pages to be visible for a user, but only specific one to be expanded as default page, you can change it in '/CMSModules/Content/CMSDesk/Default.aspx' this file, to set default values for your new page in these properties:

private int ExpandNodeID
{
    get
    {
        return QueryHelper.GetInteger("expandnodeid", 7);
    }
}

private int SelectedNodeID
{
    get
    {
        return ValidationHelper.GetInteger(Request.Params["selectedNodeId"], 7);
    }
}

Where, in my case, '7' is node id of desired page. Keep in mind, that generally it's bad to make code changes directly in the source (you will lost your change with new hotfix, or kentico upgrade), so you may find better approach for this change (f.e. customization of module).

If you want to show page as default, but hide all others (to make that page as new root), you can handle it with premissions, or with 'Starting alias path' field on users 'General' tab per each user.

2 votesVote for this answer Unmark Correct answer

Recent Answers


Trevor Fayas answered on January 15, 2018 14:07 (last edited on January 15, 2018 14:08)

There is a link format that you can bookmark that takes you to a specific node, it's like this:

/Admin/CMSAdministration.aspx?action=edit&nodeid=191&culture=en-US

Just change the node Id (found in the properties > general tab of the page)

This will get you directly to a tree node, there isn't necessarily a way to set that as the default when you go to pages though, so you can bookmark the url, or in the user settings you can set a default page but that's only when you log in to the normal site (not through admin).

Hope that helps!

0 votesVote for this answer Mark as a Correct answer

toru sato answered on January 16, 2018 03:19

Hi, Trevor, Dragoljub

thank you for your answer.
How to change '/CMSModules/Content/CMSDesk/Default.aspx' will be the way I was expecting.
It seems that setting will proceed with this. Be careful as to whether the settings will not disappear by updating!

Setting 'Starting alias path' by user setting is not used this time, but it was helpful to say that you can do such things as well.
That was a really big help.

Thank you!

0 votesVote for this answer Mark as a Correct answer

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