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

  1. Open the store JSP file that you want to add the Create or Edit link to.
  2. In the file, find an appropriate location to put the code snippet for the link.
    To understand the locations of the existing Create and Edit links in the Aurora starter store, see Click-to-edit code snippets in the Aurora starter store.
  3. 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:
  4. 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 and env_storePreviewLink variables that are used in the Aurora starter store, see the example in Code snippet to add an “Edit” link.
  5. Add CSS classes to format the Create and Edit 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.
  6. To add a visual highlight to areas in store preview that have Create and Edit 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:
    1. Test your changes in the Management Center by using this URL: https://hostname:8000/lobtools
    2. Deploy your changes to your production environment.