Kawai Wiki

Compare Revisions

Ignore whitespace Rev 217 → Rev 218

/trunk/src/main/java/org/kawai/tag/kcode/PageLink.java
9,6 → 9,7
import org.kawai.AppManager;
import org.kawai.action.PageAction;
import org.kawai.model.Page;
import org.mentawai.core.Props;
import org.mentawai.util.HttpUtils;
 
/**
18,6 → 19,8
*
*/
public class PageLink extends AbstractKCode {
private static final String PRETTY_URL_OPTION = "use_pretty_urls";
 
/**
* {@inheritDoc}
48,11 → 51,15
 
String text = attrs.get("text");
if (text == null) throw new JspException("Text attribute is mandatory for tag pageLink!");
 
String pretty = attrs.get("pretty");
boolean isPretty;
String pretty = attrs.get("pretty");
boolean isPretty = false;
if (pretty != null) {
isPretty = Boolean.parseBoolean(pretty);
} else {
Props props = AppManager.getInstance().getProps();
isPretty = props.has(PRETTY_URL_OPTION) && props.getBoolean(PRETTY_URL_OPTION);
}
 
String linkClass = attrs.get("linkClass");
/trunk/src/main/webapp/WEB-INF/conf/default/appManager.properties
14,6 → 14,9
# Google Analytics
include_google_analytics = false
 
# Use pretty URLs (search engine friendly urls)
use_pretty_urls = false