• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

What is mean by the html template: no-widget-class and no-widget-target

Scheduled Pinned Locked Moved General Discussion
6 Posts 3 Posters 1.5k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jiangcaiyangJ Offline
    jiangcaiyangJ Offline
    jiangcaiyang Anime Lovers
    wrote on last edited by
    #1

    Could anybody tell me meaning of those templates? thanks in advance.😀 🇨🇳

    1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    wrote on last edited by
    #2

    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 class col-lg-3 (width 25%). But if there are no widgets in the sidebar, the main content area is instead given the class col-lg-12 (width 100%)

    1 Reply Last reply
    0
  • jiangcaiyangJ Offline
    jiangcaiyangJ Offline
    jiangcaiyang Anime Lovers
    wrote on last edited by
    #3

    Thanks! I understand it. to control whether there should be a widget, I can go to extends -> widgets to set them.

    1 Reply Last reply
    0
  • Bruce LeeB Offline
    Bruce LeeB Offline
    Bruce Lee Anime Lovers
    wrote on last edited by
    #4

    Is it possible to have 2 no-widget-target? east and west
    0_1472003565555_upload-d301ded0-3da1-4f58-8fd0-5b4912e415e7
    Example,

    • west is col-lg-3
    • center is col-lg-6
    • east is col-lg-3

    if west is empty, center will be col-lg-9.
    if east is empty, center will be col-lg-9.
    if both west and east is empty. center will be col-lg-12?

    yariplusY 1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    replied to Bruce Lee on last edited by
    #5

    @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

    Bruce LeeB 1 Reply Last reply
    2
  • Bruce LeeB Offline
    Bruce LeeB Offline
    Bruce Lee Anime Lovers
    replied to yariplus on last edited by
    #6

    @yariplus Thanks, got your idea!

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development