1 22 23 package org.meshcms.taglib; 24 25 import java.io.*; 26 import org.meshcms.core.*; 27 import org.meshcms.util.*; 28 29 34 public final class Info extends AbstractTag { 35 public void writeTag() throws IOException { 36 Configuration c = webSite.getConfiguration(); 37 String result = null; 38 39 if (id != null) { 40 id = id.toLowerCase(); 41 42 if (id.equals("host") || id.equals("domain")) { 43 result = c.getSiteHost(); 44 } else if (id.equals("description")) { 45 result = c.getSiteDescription(); 46 } else if (id.equals("keywords")) { 47 result = c.getSiteKeywords(); 48 } else if (id.equals("author")) { 49 result = c.getSiteAuthor(); 50 } else if (id.equals("authorurl")) { 51 result = c.getSiteAuthorURL(); 52 } 53 } 54 55 if (result == null) { 56 result = Utils.encodeHTML(Utils.noNull(c.getSiteName())); 57 } 58 59 getOut().write(result); 60 } 61 } 62 | Popular Tags |