PDA

View Full Version : [CLOSED] Using a partial with TopBarItem



ATLAS
Oct 31, 2013, 10:14 AM
I have a number of panels which are included using ItemsFromPage of a container. Each panel topbar has the same "filter" controls. Can I use a partial for the TopBarItem to avoid having duplicate code that I have to maintain?

Daniil
Oct 31, 2013, 1:29 PM
Hi @ATLAS,

In such a way:

@X.Panel().TopBar(X.Toolbar().ItemsFromPartial("Partial"))
or

@X.Panel().TopBarItem(X.Container().ItemsFromParti al("Partial"))