We will discuss the advantages and the various uses of custom tags. We chose skinning because it's the best example of the power and techniques of custom tag creation and its benefits:
Custom tags can wrap a block of code and conditionally execute that code
Custom tags can process logic based on both start and end tags
Custom tags can have parent-child functionality
Custom tags can read and set calling code variables
Custom tags can return multiple variables
We are going to start with a simple page and look at changing it into a combined page that calls custom tags. We should also note that some of the fancy non-generic layout is being delivered via a CSS file included through HTML. First, let us look at the original code of our page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type"...