Tuesday, May 26, 2015

Control with no placeholder listed still renders on the page


Do not be alarmed! Even though I was when I started working on a bug for a client and looked at the Presentation Details on a Sitecore item that had a control with no placeholder. But when I took the control off the page content was gone. Conclusion was obvious - it was THAT very control that made certain things happen on the page. But how was it "attached" if there is no placeholder it goes into?





It was actually listed in the Placeholder field in the Data section on the sublayout item itself.



This is convenient and dangerous at the same time. Convenient because anywhere this control is used it would "know" to be placed in the same placeholder. Dangerous because you might intend to use a different placeholder but the same control in various places on the site.

No comments:

Post a Comment