Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When converting a demo site to server pages, how can I avoid hard-coding page names?

0
Posted

When converting a demo site to server pages, how can I avoid hard-coding page names?

0

The links in the demo site refer to HTML pages, but the links in the production site need to refer to server pages. You don’t want to add a locator to every link and hard-code the server page name. You can refer to an attribute value within the content element that refers to it by using the magic string [[@]]. You can perform a simple edit on the attribute value using the syntax [[@/a/b]], which replaces all occurrences of the string ‘a’ with ‘b’. (For multiple edits, use syntax [[@/a/b/+/c/d/…]]. Regular expressions are not supported.) So if you are using Dynamator with JSP, you could use the following to change all hrefs on the page from ‘.html’ to ‘.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123