loading

Class/Id Targeting

PANDA CUB supports Class/Id targeting to enable you to restrict where and when CUB/Static links are injected into your content.

Any css path can be used, allowing for highly granular control of which elements/pages are potentially modified with CUB/Static link injection.

To restrict the injection area, simply specify the class/id of the containing DOM elements where you would like CUB/Static links to be added.

You may specify multiple different targets separated by commas.

Examples

Content Container

In almost all layouts, article/post content is wrapped in a containing element. This is the easiest method for restricting CUB/Static links and is most often used.

In this example, the article is wrapped in a div with the class "entry-content".

Entering ".entry-content" in the generate code section of the CUB dashboard will ensure that only the article body has CUB/Static links applied.

Body Level Restriction

Some CMS systems add a class to the body to distinguish between different pages on the website.

You can use these body level classes to ensure that CUB/Static links are only added to specific pages even if page content shares the same container classes.

Entering "body.single-post" would ensure that only pages with that top level class would be modified.

You can use this in conjunction with container classes for more granular targeting. For example, "body.single-post .entry-content" would ensure that only the container on specific pages is targeted.

Pseudo-Class selectors

Any valid CSS selector may be used to restrict what areas CUB/Static links are allowed to be injected.

Customers have used this to enable "toggling" of CUB/Static links on a per post basis by including/excluding control classes and using a pseudo-class selector in their targeting.

In the example above, any page with the .single-post class on the body, with a containing div with the .entry-content class but NOT the .bypass-cub class is valid for CUB/Static link insertion.

Multiple Selectors

PANDA CUB supports multiple selectors when separated by commas.

If your site has multiple areas on a single page, or different areas on different pages, that you would like CUB/Static link injection, this allows you to use a single code block across all your pages.

The above sample would allow for CUB/Static links to be injected into any content wrapped in container with the .entry-content class OR a containing element with the .video-transcript class.