summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/TodoCategories.java
diff options
context:
space:
mode:
Diffstat (limited to 'org/madore/damlengine/TodoCategories.java')
-rw-r--r--org/madore/damlengine/TodoCategories.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/org/madore/damlengine/TodoCategories.java b/org/madore/damlengine/TodoCategories.java
index cc104e8..5d1a175 100644
--- a/org/madore/damlengine/TodoCategories.java
+++ b/org/madore/damlengine/TodoCategories.java
@@ -40,20 +40,21 @@ public final class TodoCategories extends TodoElement {
if ( ctx.ent == null )
throw new IllegalStateException("entry context not defined in categories element");
for ( String cat : ctx.ent.catList ) {
+ WeblogLink lk = new WeblogLink(ctx.ent.year, ctx.ent.month,
+ ctx.ent.day, ctx.ent.number, "",
+ ctx.ent.doSinglePage);
+ lk.setTypeCat(cat);
+ String baseDir = ((ctx.gc.uriToTop==null)?"":(ctx.gc.uriToTop+"weblog/"));
p.appendChild(ctx.doc.createTextNode(" "));
Element a1 = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "a");
- String target1URL = ((ctx.gc.uriToTop==null)?"":(ctx.gc.uriToTop+"weblog/"))
- + cat + ".html";
- a1.setAttributeNS(null, "href", target1URL);
+ a1.setAttributeNS(null, "href", lk.getFile(baseDir));
a1.setAttributeNS(null, "title",
TodoWeblogSelectionElement.categoryName(cat, lang));
p.appendChild(a1);
a1.appendChild(ctx.doc.createTextNode(cat));
p.appendChild(ctx.doc.createTextNode("("));
Element a2 = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "a");
- String target2URL = target1URL
- + "#d." + ctx.ent.date + "." + ctx.ent.number;
- a2.setAttributeNS(null, "href", target2URL);
+ a2.setAttributeNS(null, "href", lk.getTarget(baseDir));
p.appendChild(a2);
a2.appendChild(ctx.doc.createTextNode("\u2022"));
p.appendChild(ctx.doc.createTextNode(")"));