cdw9
cdw9

Reputation: 390

How to best replace link text with Diazo

I want to replace the 'Upcoming Events...' text in the event portlet's footer. Here is the rule I currently have:

<replace content="//dl[contains(@class,'portletEvents')]//dd[contains(@class,'portletFooter')]//a/text()">
    More Events
</replace>

This code works, but significantly slows down the site. Can the rule be written better?

Upvotes: 2

Views: 198

Answers (1)

cdw9
cdw9

Reputation: 390

I found another way to do it:

<replace css:content=".portletEvents .portletFooter a">
    <a>
        <xsl:apply-templates select="./@*[contains(' href ', concat(' ', name(), ' '))]"/>
        More events
    </a>
</replace>

Upvotes: 2

Related Questions