On 7/31/05, Rolando Isidoro <[EMAIL PROTECTED]> wrote:
> Where you want the link or details, put:
> <div id="details-or-link"/>
> This way, from what I can figure out, I'll have to insert <div
> id="details-or-link"/> in each index_*.xml for every staff member, right?
No. Updating many content files is too much work for me. I would
have put the DIV into the XSL. It belongs in page2xhtml-profile.xsl
> Add a template to fill the correct details:
> <xsl:template match="[EMAIL PROTECTED] = 'details-or-link']">
> <xsl:choose>
> <xsl:when test="[EMAIL PROTECTED] = 'details']">
> <xsl:apply-templates select="[EMAIL PROTECTED] = 'details']"/>
> </xsl:when>
> <xsl:otherwise>
> Click <a href="/staff/{$empname}/details">here</a> for a
> more detailed profile
> </xsl:otherwise>
> </xsl:choose>
>
> (Depending on your code, it may be "xhtml:div[" rather than "div[".)
>
> This template goes in page2xhtml-profile.xml?
> With all this changes made I still can't manage to get the desired result.
> I can detect 2 things not working correctly:
> - the <div id="details-or-link"/> isn't rendering neither the link string
> if a staff member page or the details in a profile staff member page
Yes.
I mentioned (and you even copied the comment) your XSL might require
"xhtml:div". Try it in the "when test" and/or in the apply-templates.
You probably need it both places. (Victoria already teased you about
missing my comment and not trying that.)
> Here a small issue appears, I'm using two different strings for the link,
> one in PT and other one in EN, which means I'll have to pass <map:parameter
> name="language" value="{page-envelope:document-language}"/>
> in the pipeline into page2xhtml-profile.xsl and the XSL must have <xsl:param
> name="language"/>, so I can later distinguish which language the page is
> written in and display the right string for it, right? I've introduced the
> following block of code under page2xhtml-profile.xsl and neither the links
> or the details div are showing up:
Have you read about i18n? It handles language translation easily.
<i18n:translate>
<i18n:text i18n:key="profile-details-click"/>
<i18n:param><xsl:value-of select="$staff-id"/></i18n:param>
</i18n:translate>
Add these lines.
FILE: /lenya/resources/i18n/msui.xml
<message key="profile-details-click">Click <a
href="/staff/{0}/profile">here</a> for a more detailed
profile.</message>
FILE: /lenya/resources/i18n/cmsui_pt.xml
<message key="profile-details-click">Clique <a
href="/staff/{0}/profile">aqui</a> para um perfil mais
detalhado.</message>
I just added a new page to my website:
http://solprovider.com/lenya/i18nvariables
You should read the earlier pages if you have not used i18n yet. This
project just became much easier.
> - if I access a page using an URL terminating with staff/.../profile I
> can't return the content of the respective staff/... document.
> This line is commented because Lenya tries to retrieve the document
> with ID staff/.../profile which doesn't exist; how can I remove the profile
> suffix from the document ID, so it will retrieve the correct
> document?
> <!-- <map:part
> src="cocoon:/lenya-document-view/live/profile/staff/{2}"/>
> -->
You are trying to match this pipeline:
<map:match pattern="lenya-document-*/*/*/**.xml">
So you need to add the extension:
<map:part src="cocoon:/lenya-document-view/live/profile/staff/{2}.xml"/>
solprovider
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]