Naming the object ID
Posted: Fri Feb 14, 2025 12:24 pm
Hello!
I have questions about the site object IDs.:
1. Should the object's ID be unique within the page it is located in? Or should all site objects (i.e. on all pages) have unique IDs?
2. Please share your experience with naming site objects so that they are not too long, but on the other hand, it is clear what kind of object it is.
At the moment, I use the following naming system for objects:
The abbreviated name of the object type (lg, fg, fc, txt, img, bm, and so on)_the abbreviated name of the page_description of the object's purpose.
The result is (for example) the following: lg_catalog_products_header_group_products.
Everything is clear to me later in the process, but naming takes a lot of time and they get long. ☹
Please share your experience in this case!
I have questions about the site object IDs.:
1. Should the object's ID be unique within the page it is located in? Or should all site objects (i.e. on all pages) have unique IDs?
2. Please share your experience with naming site objects so that they are not too long, but on the other hand, it is clear what kind of object it is.
At the moment, I use the following naming system for objects:
The abbreviated name of the object type (lg, fg, fc, txt, img, bm, and so on)_the abbreviated name of the page_description of the object's purpose.
The result is (for example) the following: lg_catalog_products_header_group_products.
Everything is clear to me later in the process, but naming takes a lot of time and they get long. ☹
Please share your experience in this case!