Custom Component ID

Hi,

Is it possible to rename the component ID’s? If not, is it possible to create a shorcode like this: [cs_component label="Component_Name"] instead of the stock shorcode like [cs_component id="okDk1iPu1BilP3fXcr"]?

If these are not possible, it may be a feature request.

Thanks

Gunes

Hey Gunes,

Thanks for reaching out!

Currently, there’s no option to changed the ID of the components to a custom one. That being said, I’ll just add this as a feature requrest.

Thanks for the response Marc,

When I search the component ID in Cornerstone search bar, it pulls up the pages that the components is used, however, if theres are too many Components, I think it will be difficult to figure out where the component is exactly used.

Just an idea.

1 Like

Hey Gunes,

Thanks for sharing your feedback, our developer will read your idea once they able to check the feature request.

Cheers!

For now if you enter the dev tools in preferences and look for _c_id you can change the Component ID. If you were using this component though you’ll need to go through all usages in your page. If you just setting up a new component you should be fine.

Thanks Charlie, renaming the components will help especially when the component is used inside an ACF field in a product page, as it will allow me to know what is inside from the name.

One more question, but let me explain what I am trying to achieve: I want to manage the components library like a database. There will be 5-6 components only, these will be:

(1) Dashboard: To display all of the active components, manage them, write to-do’s etc.
(2) Active Components: This is where live components will be stored.
(3) Projects: This is where components will be built.
(4) Ideas and Resources: This is where the ideas and resources, which will further become a “project”.
(5) Archive: This is where I will keep the depreciated components.
(6) Back-up: I will keep a copy of the active components, in case it is deleted by accident or need to restore a back up.

To achieve this, I need to be able to copy and paste the “component section” from one component to another and as far I as see, I can use the developer tools to do this: Dev Toolkit > Tools > Elements (Copy Element | Paste Element).

Now the questions are, (1) It is okay to use this copy and paste of the Dev Toolkit, or is there anything that I need to be aware of? (2) Is it a good idea to keep all of the Active components inside a single component? If the number of components becomes high, (do you think) would it affect the page load speed on the front end?

Thanks

Gunes

  1. Yes that is okay to do. When you copy and paste a component it shouldn’t copy the component ID. You can also right click on an element in the inspector to do this copy paste action.
  2. That’s fine and it shouldn’t slow pages down. The components are stored as a single data store so lookups for each component should be quick. Caching a page could also help.

Let me know if this helps and have a great day.

Charlie, thanks for the great support and happy thanksgiving!

1 Like

Hey Gunes,

You’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.