Saturday 5 September 2020

Sitecore Certification, Interview Sample Questions - Part 12





1. Which one of the following maps the item to the current URL?

a. RenderingContext.Current.ContextItem

b. RenderingContext.Current.Rendering.item

c. RenderingContext.Current.URL

d. None of the above



Answer: a



2. Which on the following will help you to easily display contents from an item other than the context item?

a. RenderingContext.Current.ContextItem

b. RenderingContext.Current.Rendering.item

c. RenderingContext.Current.URL

d. None of the above



Answer: b

3. Where do you setup the Data Source location for a component?

a. Component Tool bar> More>Edit Experience Editor Option

b. View> Advanced>Edit Experience Editor Option

c. Home> Advanced>Edit Experience Editor Option

d. Component Tool bar> More>Advanced>Edit Experience Editor Option



Answer: a

4. Which one of the following will allow developer to access the parameters of the component programmatically?

a. @Model.Rendering.Parameters["CssClass"]

b. @RenderingContext.Current.Rendering.Parameters["ButtonText"]

c. Both a and b

d. None of the above



Answer c

5. What's the benefit of using Wildcard items in Sitecore?

a. Allows you to work with dynamic URLs

b. It matches to any request

c. It ensures the URL is dynamic

d. All of the above



Answer: d

6. What methods can be used to navigate the tree?



a. .Parent()



b. .GetChildren()



c. .Axes.GetAncestors()



d. .Axes.GetDescendants()



e. All of the above



Answer: e

7. When you use LINQ to sort items, what needs to be done to improve performance?

a. Instruct the GetChildren method not to sort items

b. Execute query right away

c. Instruct Sitecore.Context not to execute the query

d. None of the above



Answer: a

8. When you editing an item, how do you ensure that your changes are made on the Master database only?

a. Point to the Master data using the following statement Var masterDB = Sitecore.Configuration.Factory.GetDatabase("master")

b. Change the database from the Sitecore Desktop view

c. Change the database from the Sitecore Rocks plugin

d. All of the above



Answer: a

9. How do you run code as another user in Sitecore?

a. Sitecore.SecurityModel.SecurityDisabler()

b. Sitecore.Security.Accounts.UserSwitcher("usersID")

c. Sitecore.Context.Account.Switch("userid");

d. None of the above



Answer: a,b

10. Where developer can find JavaScript libraries?

a. \Sitecore\shell\client\Services\Assets\lib

b. \Sitecore\shell\configure\Assets

c. \Sitecore\shell\Configure\lib

d. None of the above



Answer: a

No comments:

Post a Comment