What is mean by the html template: no-widget-class and no-widget-target
-
Could anybody tell me meaning of those templates? thanks in advance.
-
These properties are used to apply a special class when no widgets are in the target area.
<div class="col-lg-9" no-widget-class="col-lg-12" no-widget-target="sidebar">Main content</div> <div widget-area="sidebar" class="col-lg-3"></div>
For example, here the main content area normally has class
col-lg-9
(width 75%) and the sidebar has classcol-lg-3
(width 25%). But if there are no widgets in the sidebar, the main content area is instead given the classcol-lg-12
(width 100%) -
Thanks! I understand it. to control whether there should be a widget, I can go to extends -> widgets to set them.
-
Is it possible to have 2 no-widget-target?
east
andwest
Example,west
iscol-lg-3
center
iscol-lg-6
east
iscol-lg-3
if
west
is empty,center
will becol-lg-9
.
ifeast
is empty,center
will becol-lg-9
.
if bothwest
andeast
is empty.center
will becol-lg-12
? -
@Bruce-Lee In this situation, I create two containers, one container that includes the left sidebar and the main content, and another container that contains the first container and the right sidebar.
Example here:
https://github.com/yariplus/nodebb-plugin-featured-topics-extended/blob/master/public/templates/news.tpl