Adding the Create
and Edit
links to store pages
After you decide where to put the Create
and Edit
links,
you must add the code that creates the link to the appropriate JSP
pages. You can also add CSS classes, variables, and JavaScript functions
to control the appearance and behavior of the links.
Procedure
- Open the store JSP file that you want to add the
Create
orEdit
link to. - In the file, find an appropriate location to put the code
snippet for the link.To understand the locations of the existing
Create
andEdit
links in the Aurora starter store, see Click-to-edit code snippets in the Aurora starter store. - Add the code for the link, and provide values for the parameters.
The code snippet and parameters are explained in detail in the following topics:
- If the link is directly on a store page, add code
to display the link only when the pages are rendered during a store
preview session that is launched from Management Center.To learn about the
env_inPreview
andenv_storePreviewLink
variables that are used in the Aurora starter store, see the example in Code snippet to add an “Edit” link. - Add CSS classes to format the
Create
andEdit
links.To learn more about the CSS classes that are used in the Aurora starter store, see the example in Code snippet to add an “Edit” link. - To add a visual highlight to areas in store preview that
have
Create
andEdit
links, you can define a JavaScript function for this purpose.To understand the JavaScript function that is used in the Aurora starter store, see Click-to-edit highlighting function in the StoreCommonUtilities.js file.
What to do next
- If you are adding a
Create
link, you can prefill values in the Management Center properties view. Continue to the next topic in this task flow. - If your customization is complete:
- Test your changes in the Management Center by using this URL: https://hostname:8000/lobtools
- Deploy your changes to your production environment.