I used the %shortDate% macro to create unique ids, but that generates invalid HTML: the ID datatype must begin with a letter (for W3 knows what reason), and may not contain slashes (/).
The letter thing has to do with what constitutes a "name" as opposed to character data, but beyond that, it's lost to the mists of time to me as well. Originally Radio's own item permalinks were just the item numbers, too, but someone pointed out the letter thing.
But you could write:
<div class="date" id="d<%string.replaceAll ("<%shortDate%>", "/", "-")%>"> ... </div>
to do it right. But then, I use the following for my item permalink anchors, so maybe it's better to give it a miss:
<%
if flIndexPage { return ""; };
local (ret = "");
if (number ("<%paddedItemNum%>") <= 1380) {
ret = "<a name='" + string.dropNonAlphas("<%when%>") + "'></a>\n\t"; };
if (number ("<%paddedItemNum%>") <= 1853) {
ret = ret + "<a name='i" + string.dropNonAlphas("<%when%>") + "'></a>"; };
ret = ret + "<a name='" + KitSuite.past.permalinkID (item:"<%paddedItemNum%>") + "'></a>";
return ret;
%>
Comments
comment
cant i have a free shell