Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-09-01 23:08:29
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Problem styling permlink anchors by css
Though I don’t have any problem to style a normal a-tag, I’m having huge ones doing this for permlinks.
My links use a different color than normal text, a rather light one. For titles this is undesired and I don’t want article titles that are surrounded by permlinks look like links, as this is misleading for my site.
I tested the stylesheet locally in static html, same source code, and there it did what it should do. The selector I use to achieve styling does work for the txp site as i succeeded in changing the hand cursor into the default. No faults in the css code: copied back into the static html page everything functions perfectly.
Has anyone had the same problem or does know of a way to solve it? Any help is greatly appreciated!
Last edited by uli (2006-09-01 23:09:55)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#2 2006-09-01 23:17:26
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Problem styling permlink anchors by css
You can do something like this in your article form:
<code>
<a href=”<txp:permlink />” title=”<txp:title />” class=“whatever”><txp:title /></a>
</code>
and style a.whatever in your CSS.
Offline
#3 2006-09-02 00:02:34
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: Problem styling permlink anchors by css
Ah, Els, hi! (saw your nose so often before ;)
The part i’m having problems with is not the link, not the href part, it’s the article’s title itself, the permlink anchor used on the target page. <code><txp:permlink><txp:title /></txp:permlink><txp:body /></code>
Last edited by uli (2006-09-02 00:09:55)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Problem styling permlink anchors by css
If you don’t want links in titles to look like links, and assuming your title class was called, say, headline, wouldn’t this work ?
<code>
.headline A:link,
.headline A:visited,
.headline A:active
{
text-decoration: none;
}
</code>
~Nick
Last edited by NickML (2006-09-02 08:41:58)
Offline
Re: Problem styling permlink anchors by css
uli wrote:
The part i’m having problems with is not the link, not the href part, it’s the article’s title itself, the permlink anchor used on the target page. <code><txp:permlink><txp:title /></txp:permlink><txp:body /></code>….No faults in the css code: copied back into the static html page everything functions perfectly.
Not quote sure I understand this, though: this is the code from the front tage of here
<code>
<div class=“bigheadline”><txp:permlink><txp:title /></txp:permlink></div>
</code>
which gets rendered in the HTML as:
<code>
<div class=“bigheadline”><a href=“http://www.epuk.org/News/alamy-uploads-a-sneak-preview” title=“Permanent link to this article”>AlamyUpload: a sneak preview</a></div>
</code>
- bigheadline* is then styled in the css as in my post above.
~Nick
Offline
#6 2006-09-02 13:41:37
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: Problem styling permlink anchors by css
NickML wrote:
Not quite sure I understand this
My lingo? ;) The difficulty to understand seems to come from the misleading naming of permlink as well, which is no link but rather a named anchor.
Let’s take your site as example: how did you achieve, that on mousover the headline on this page doesn’t behave like a link, although it presumably uses a permlink/“permanchor” around the title tag? Maybe one can use other (hidden?) elements to function as a permlink/“permanchor”, but I haven’t heard of it yet.
I’ll try to explain in another way: the normal named anchor <code><a name=“i_am_the_anchor_for_the_headline_to_my_right”></code> in standard html doesn’t change the look of the element it is associated with <code><h3>I’m the headline this dam anchor is driveling of</h3></code>, whereas the permlink which surrounds the title <code><txp:permlink><txp:title /></txp:permlink><txp:body /></code> makes my headline look like a link, which is completely undesired.
Btw, last night i discovered that titles I styled with textile (by means of nhn_typotuner) do take the styles that i want titles to take. But even in this case it isn’t possible to make them accept another font weight. Seems like they’re rather choosy. Pffff! Weird!
Ah, forgotten:
a) thanks for your help, els and Nick!
And b) No, none of the solutions you offered here works for me. Tried everything I can imagine, includive of surrounding the permlinked title in the article form with a span, which should be nearest as possible.
Last edited by uli (2006-09-02 13:49:18)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Problem styling permlink anchors by css
uli wrote:
NickML wrote:
Let’s take your site as example: how did you achieve, that on mousover the headline on this page doesn’t behave like a link, although it presumably uses a permlink/“permanchor” around the title tag?
The title on that page isn’t a link, and doesn’t have an anchor. The TXP code is simply:
<code><span class=“articleheadline”><txp:title /></span></code><br><br>
~Nick
Last edited by NickML (2006-09-02 13:52:52)
Offline
#8 2006-09-02 13:59:22
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: Problem styling permlink anchors by css
well, where do you place the permlink to make the excerpt on the title page to function as a link? Seems like this is the wrong forum for my question, as this is obviously no styling problem ;)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Problem styling permlink anchors by css
uli wrote:
well, where do you place the permlink to make the excerpt on the title page to function as a link? Seems like this is the wrong forum for my question, as this is obviously no styling problem ;)
As I said before, on the” front page the <txp:permlink> tags are wrapped around the individual article headlines using the following code from within an article form called by the article tag:
<code><div class=“bigheadline”><txp:permlink><txp:title /></txp:permlink></div></code><br><br>
This then produces a link to the article by itself. No other permlinks or anchors needed.
~Nick
Offline
Re: Problem styling permlink anchors by css
If I understand correctly, you want the following:
[1] On pages that have a list of articles (like your home page), txp:title is a functional link…
[2] but on individual article pages, txp:title is not a link…
…then try putting this in your article form:
<code>
<txp:if_article_list>
<txp:permlink><txp:title /></txp:permlink>
</txp:if_article_list>
</code>
<code>
<txp:if_individual_article>
<txp:title />
</txp:if_individual_article>
</code>
Last edited by reid (2006-09-02 14:10:18)
TextPattern user since 04/04/04
Offline
#11 2006-09-02 14:21:30
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: Problem styling permlink anchors by css
it’s getting closer to the curbstone, but the car isn’t parked yet ;)
what i want is a link on the frontpage, named like the section where the article appears plus a page like the part nick set into #7 (which seems covered for now).
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Problem styling permlink anchors by css
uli wrote:
what i want is a link on the frontpage, named like the section where the article appears plus a page like the part nick set into #7 (which seems covered for now).
If I understand you right, both these are quite simple to do. Are you trying to cover both options from within the same article form ? Because, to be frank, I personally wouldn’t.
On the front I’d call up this kind of article form:
<code>
<txp:section />
<txp:permlink><txp:tltle /></txp:permlink>
<txp:excerpt />
<txp:permlink>Read more of this article</txp:permlink>
</code><br/><br/>
And for displaying inside, I’d use a different article form called from a different page (ie, other than “default”):
<code>
<txp:title />
<txp:excerpt />
<txp:body />
</code><br/><br/>
~Nick
Last edited by NickML (2006-09-04 11:02:09)
Offline