Hi Levi,

Here is what I currently have in my .html page for this mixed string:

<p i18n:translate="focus_on_text">Check out our new
<a href="/posts/cc_launcher.php"
tal:attributes="href classroom_corner/href; title classroom_corner/title"
tal:content="classroom_corner/text">"Classroom Corner"</a> feature, where
you can stay up-to-date with all the goings-on for your child's
classroom!</p>

The wrinkle comes in when I need to wrap the whole thing in the
'i18n:translate' attribute (since all of this is contained within a single p
tag).  I *could* split out the text just before the hyperlink into its own p
tag and do the same for the trailing text after the hyperlink, but the way
my CSS is set up, that would introduce line breaks after each block of text,
which I don't want...

I'll keep looking into this, but if you have any other ideas, please let me
know.  I'm very new to PHPTAL, so bear with my learning curve... :)

- Ian

On Wed, Dec 3, 2008 at 6:20 PM, Levi Stanley <[EMAIL PROTECTED]> wrote:

> Did you tried this?
>
> <a  href="${node/url}" tal:content="${node/string}">Doesn't matter what is
> here</a>
>
> Ian Boersma wrote:
> > Hi,
> >
> > I am using PHPTAL to templatize a website that needs to be delivered in
> > English and Spanish (so I'm using PHPTAL's integrated 'gettext' class for
> > doing the string translation).  While this is going great for simple
> strings
> > and standalone hyperlinks (e.g.: a href="....")  I'm not sure how to
> handle
> > it when dealing with a string with an embedded hyperlink.
> >
> > For example, I have the string:  "Check out our new <a
> > href="/posts/cc_launcher.php">Classroom Corner"</a> feature, where you
> can
> > stay up-to-date with all the goings-on for your child's classroom!"
>  While I
> > an use the "tal:attribute" method on standalone hyperlinks (say in a
> > navigation menu) and can use the "tal:content" or "i18n:translate"
> methods
> > to replace strings, I'm not sure how to achieve BOTH in this mixed
> > string/hyperlink model.  At this point, applying the "tal:content" method
> > only allows me to replace the entire string (anchor tag included) with
> > another string (thus, removing the anchor tag altogether in the output).
> >
> > Any ideas how to use PHPTAL to replace both the string portion of this
> AND
> > the attribute portion?
> >
> > Thanks in advance for your help,
> >
> > Ian
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > PHPTAL mailing list
> > PHPTAL@lists.motion-twin.com
> > http://lists.motion-twin.com/mailman/listinfo/phptal
>
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>



-- 
Life, if well lived, is long enough.

~ Seneca (5 BC - 65 AD).
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to