# Classes & IDs

# ID

The Block ID gives a unique identity to your block.

  • It can act as a named anchor. You can therefore create an anchor link that takes you to the desired element

  • It can also act as an identifier for the Cwicly plugin to allow targeting specific blocks for specific actions

To find the Block ID of a selected block:

  1. Select a block
  2. Open the block inspector
  3. Navigate to the primary tab
  4. Find the block ID name in the Block ID field

Whenever you insert or create a block, a unique Block ID is automatically created and applied to the element.

That's it! Cwicly doesn't rely on user ID creation, preferring to have a unique ID created for every block.

Since IDs are specific to each block, modifying their name will have to be done via the block they are related to.

To rename a Block ID:

  1. Select a block
  2. Open the block inspector
  3. Navigate to the primary tab
  4. Double-click the Block ID name in the Block ID field and rename it. Make sure it is unique.

Since Block IDs are bound to a specific block, removing that block will automatically remove the Block ID from your website.

To redirect the user to an element of your page, or any element on any page of your website: 

  1. Copy the Block ID name from the selected block. Find a Block ID.
  2. Copy the page's URL. Make sure to remove the trailing slash.
  3. Add your Block ID name to the end of the URL with a #

Your final link to a block ID would be: 

  1. Page URL: https://cwicly.com/
  2. Remove trailing slash: https://cwicly.com
  3. Block ID: about
  4. Add to page URL with #https://cwicly.com#about

# Class name

The class attribute is mainly used as a formatting tool: it will be used to apply styles to the elements that it contains.

To find the class name of a selected block:

  1. Select a block
  2. Open the block inspector
  3. Navigate to the primary tab
  4. Find the Class Name property

Whenever you insert or create a block, a unique class is automatically created and applied to the element. 

That's it! Cwicly doesn't rely on user class creation, preferring to have a unique class created for every block.

Since classes are specific to each block, modifying their name or properties will have to be done via the block they are related to.

To rename a class:

  1. Select a block
  2. Open the block inspector
  3. Navigate to the primary tab
  4. Double-click the class name in the Class Name property and rename it. Make sure it is unique.

To edit class attributes:

  1. Select a block
  2. Open the block inspector
  3. Navigate to the primary tab
  4. Edit style properties

Since classes are bound to a specific block, deleting that block will automatically remove the class from your website.

If you want to use classes from different blocks on a specific block, check out additional classes.

# Additional Classes

After you've created a block and added styling to it, you might want to reuse that styling on other blocks without affecting their own unique styles.

This is where Additional Classes come into play.

Instead of duplicating styles from a block to another block, Cwicly lets you add as many existing classes as needed to the selected block.

You can add Additional Classes to elements by typing in a new class name in the Additional Classes field.

  1. Select a block
  2. Open the block inspector
  3. Navigate to the primary tab
  4. Add the existing class you want to the Additional Classes field and press Enter.

To remove an additional class:

  1. Select a block
  2. Open the block inspector
  3. Navigate to the primary tab
  4. Find the class you want to remove and click on the cross. The class will then be removed from that block, but will still exist in its parent block.