[opencms-dev] need some help on customizing the <cms:link> tag
Michael Emmerich
m.emmerich at alkacon.com
Thu Sep 4 17:26:11 CEST 2008
Kunkun,
> Hi Kunkun,
>
> for the first part of your question you can possibly use the
> <cms:decorate>-Tag. For further details have a look at the
> OpenCms-Documentation Modules.
the <cms:decorate> tag only modified text nodes, this would not help.
Use the <cms:parse> tag and write your own parser that is triggered by
link tags. Modifiy the link tags with the id, e.g. the hash code of the
target and write this into a database.
Sonthing that holds the id, the target and the number of hits.
In addition add some code to your link that starts a ajax request when
the link is klicked. The target of this ajax reqeust must receive the id
and increase the number of hits for this id.
HTH,
Michael
> ------------------------------------------------------------------------
> *Von:* opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] *Im Auftrag von *kk
> *Gesendet:* Donnerstag, 4. September 2008 16:58
> *An:* opencms-dev at opencms.org
> *Betreff:* [opencms-dev] need some help on customizing the <cms:link> tag
>
> Dear together,
>
> my name is kunkun. I am a computerscience-student in Germany. I am
> working on a project, which extends opencms with some new features.
>
> The problem is:
>
> 1. I have to mark the links, that i create on a site, with something
> like an ID.
> 2. Then i have to log the Link ID, whenever the link is clicked on the
> site, when it is made online.
>
> Can u give me some Ideas, how to do that?
>
> My idea is to create a class, which inherits the internal link class of
> OpenCms, and change the html-code that is generated during constuction
> of the link.
>
> But with which class should I start. There is a class named
> CmsJspTagLink, which can be used with <cms:link>.
> The class CmsLinkManager is also used to substitute the name for links
> inside the VFS System. But how do i do
> it in general purpose not only for internal links?
>
> I am looking for some ideas asap.
>
> Thank u very much.
>
> Kunkun
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
--
Michael Emmerich
-------------------
Alkacon Software GmbH - The OpenCms Experts
http://www.alkacon.com
http://www.opencms.org
More information about the opencms-dev
mailing list