<ww:if(<ww:file_exists filename="content/<ww:category_number>.html">)( <ww:include_file filename="<ww:category_number>.html" default="generic.html" /> ) else()>
The above code will search for a HTML file in the “content” directory named after the “category number” from System Five and insert it, if it cannot find the file it will display generic.html
Using this method is much more efficient compared to the traditional method shown below.
<ww:if('<ww:category_number>'=='100')(text goes here)else( <ww:if('<ww:category_number>'=='200')(Text goes here)else( <ww:if('<ww:category_number>'=='700')(Text goes here)else( <ww:if('<ww:category_number>'=='600')(Text goes here)else( <ww:if('<ww:category_number>'=='300')(Text goes here)else( <ww:if('<ww:category_number>'=='800')(Text goes here)else( <ww:if('<ww:category_number>'=='400')(Text goes here)else( <ww:if('<ww:category_number>'=='143')(Text goes here)else( <ww:if('<ww:category_number>'=='900')(Text goes here)else( <ww:if('<ww:category_number>'=='430')(Text goes here)else(Generic text)>)>)>)>)>)>)>)>)>)>