Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-08-10 17:05:29
- Apokalyptik
- New Member
- Registered: 2007-08-10
- Posts: 4
Trying to find a way to do alternate (mouseover) text for articles.
I just recently started up my humble web-blog, and I’m a super newbie to anything beyond simple-ass HTML. I tried to find a how-to for what I thought would be a really simple intro-level project, and I haven’t found anything but road blocks.
What I’m shooting for is to essentially add the tag “title=” somewhere inbetween the “<a” and “href=” that is generated from my article title. I have a custom-field box set up, and I want it to take the text input into that box (labeled “alt_text”) and make it the mouse-over text.
The problem is that my article form is <h2><txp:permlink><txp:title /></txp:permlink></h2>, and I can’t just shove that sort of code in there— and I have zero idea how to edit the anchor that it’s editing to derive the article title.
I found what I thought was a solution, someone who said to use <a href=”<txp:permlink />” title=”<txp:title />”><h1><txp:title /></h1></a> for some such or other as the article form. So I grabbed that, put it in, and attempted to change it to read title=”<txp:alt_text />. That didn’t work. :p
All it showed was “” or the first word of the article title, and then broke off.
Anyone have any ideas for me? I’m at a loss.
-Thanks!
Offline
Re: Trying to find a way to do alternate (mouseover) text for articles.
you almost had it. try this:
<h2><a href="<txp:permlink />" title="<txp:custom_field name="alt_text" />"><txp:title /></a></h2>
Last edited by iblastoff (2007-08-10 17:53:17)
Offline
#3 2007-08-10 21:49:31
- Apokalyptik
- New Member
- Registered: 2007-08-10
- Posts: 4
Re: Trying to find a way to do alternate (mouseover) text for articles.
Aha, thanks man. I thought when they wrote “<txp:custom_field_name />” it meant, fill in the name of the field.
MANY many thanks.
Offline