Menu

#27 Links: Site XREFS

open
nobody
None
5
2001-11-07
2001-11-07
No

I think that this would be fairly simple to do, and I'm
going to look into the code and see if I can figure
out how to do it.

This is a feature that's built into another CMS
called Manila by Userland Software.

Each Article/News Item/Review etc. (I'll call these
"items" for the rest of this post) gets put into a
cross reference table (which they call a "shortcut")
and if that item's name is included in another
article enclosed in quotes, a URL is automatically
generated pointing to that item.

I think that to do this, a new table would need to be
created, called something like nuke-xrefs. The
columns in the table would be NAME and URL.

Then, when rendering an article:
<ol>
<li>Add the URL to this article to the xref table
<li>Scan the text of the article for strings enclosed
in quotations, then:
<li>For each string in quotes, look into the nuke-
xref table for an item in which NAME matches the
enclosed string.
<li>If a match is found, construct an HREF as
follows: <a href="URL">NAME</a>
</ol>

This makes it trivial to reference any other page on
a site by just knowing the name.

The next step would be to supply a page to allow
the administrator of the site to add items pointing
outside the site manually.

I know this really sounds like a plugin (in fact, if I
can figure out how to do that, I will :-), but I thought
I'd suggest it as a core feature.

Any thoughts?

Discussion


Log in to post a comment.

MongoDB Logo MongoDB