Help - Search - Members - Calendar
Full Version: Link Entry Titles to THAT ENTRIES Archive?
Movable Type Community Forum > Additional Resources > Tips and Tricks
SpyderFCS
Alright, I am looking to link the Entry Title to the Archive for that specific Entry. I have already set up my individual archive file template with this:
QUOTE
<$MTArchiveDate format="%Y/%m/%d"$>/<$MTEntryTitle dirify="1"$>.html


I have tested it by manually typing in the archive location which is just /year/month/day/entry_title.html

However, I want to set up my Main Index Template to Automatically link all entry titles to their respective entry archives.

Any and all help would be great!
Sproet
Something like
CODE
<a href="<MTEntryPermalink>"><MTEntryTitle></a>
, perhaps?
SpyderFCS
wow...perfect...thank you very much.

One more question, is there a way to stop "links" from looking like links but yet still have the ability to act like links.

Ok, maybe that is confusing but I'd like to keep some of my links like the entry title to look as if they were standard text but than still be able to link to other pages. Probably another dumb question, but I am still learning.

Thanks Sproet!
Sproet
Yes, there is...you need to manipulate your css file for that. Do you know how to do that?

You need to make a new class for the entrytitle-link, say you call it .entrytitlelink. (to keep it simple :-) )

So:

let's say your entrytitle's font is Arial and the colour for it is White, when it is *not* a link
let's say all your links in your blog are Red and turn blue when hoverd over

what you want is to have an entrytitle behaving like a link but looking like ordinary text

you need to define a class in your cssfile that makes *only* the entrytitle behave like that (you could use the class for other stuff but that's not the point now)

I will take your CSS file now and try to add to it the calss that I have in mind, hang on...
SpyderFCS
here is my css file, at least the part I'm sure I need to change.

QUOTE
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 1.2em;
color: #333333;
background-color: #CCCCCC;
background-image: url(http://www.spyderfcs.com/layouttesting/BodyBackground.gif);
background-repeat: repeat-y;
background-position: 50% 0px;
text-align: center;
margin: 0px;
padding: 0px;
}
/*-------TEXT---------*/
a:link {
color: #666;
}

a:visited {
color: #333;
}

a:hover {
color: #ccc;
}

p {
margin: 1em 0 1em;
padding: 0;
}

h1 {
font-family: "lucida grande", verdana, sans-serif;
font-size: 115%;
font-weight: bold;
color: #c63;
padding: 0;
margin: 0;
}

h2 {
font-family: "lucida grande", verdana, sans-serif;
font-size: 110%;
color: #FF582E;
padding: 0;
margin: 0 0 1em 0;
}

h2 a:link, h2 a:visited {
text-decoration: none;
color: #c63;
}

h2 a:hover {
color: #930;
}


What I was asking was, is there a way to not change the h2 a:link color and all that and just make some links display as the standard h2 color?
SpyderFCS
kinda like to can stop pictures and stuff from having borders by using "border="0" "
Sproet
That would be an inline style... better to use CSS in a file.

Do you exclusively use the h2 for your titles?? If so, it's real easy... All you need to do is change some colour codes then.
SpyderFCS
yeah...I suppose I could just change the h2 a:link and h2 a:visited to the same color as the h2. For some reason I was thinking that would mess things up on my page but I just did it and it seems to be ok.

I really appreciate the help, it's hard to find help if your a newbie around here...
Sproet
I've added the class .entrytitlelink

CODE
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 1.2em;
color: #333333;
background-color: #CCCCCC;
background-image: url(http://www.spyderfcs.com/layouttesting/BodyBackground.gif);
background-repeat: repeat-y;
background-position: 50% 0px;
text-align: center;
margin: 0px;
padding: 0px;
}
/*-------TEXT---------*/
a:link {
color: #666;
}

a:visited {
color: #333;
}

a:hover {
color: #ccc;
}

p {
margin: 1em 0 1em;
padding: 0;
}

h1 {
font-family: "lucida grande", verdana, sans-serif;
font-size: 115%;
font-weight: bold;
color: #c63;
padding: 0;
margin: 0;
}

h2 {
font-family: "lucida grande", verdana, sans-serif;
font-size: 110%;
color: #FF582E;
padding: 0;
margin: 0 0 1em 0;
}

h2 a:link, h2 a:visited {
text-decoration: none;
color: #c63;
}

h2 a:hover {
color: #930;
text-decoration: none;
}

.entrytitlelink {
font-family: "lucida grande", verdana, sans-serif;
font-size: 110%;
color: #FF582E;
padding: 0;
margin: 0 0 1em 0;
}

.entrytitlelink a:link, h2 a:visited {
text-decoration: none;
color: #FF582E;
}

.entrytitlelink a:hover {
color: #FF582E;
text-decoration: none;
}


So you would use that like this

CODE
<div class="entrytitlelink"><MTEntryTitle></div>

or

<p class="entrytitlelink"><MTEntryTitle></p>


in your template.

If you only use the h2 tag for your titles, you could just as well skip the new class .entrytitlelink and change the behaviour of the h2 links like this:

CODE
h2 {
font-family: "lucida grande", verdana, sans-serif;
font-size: 110%;
color: #FF582E;
padding: 0;
margin: 0 0 1em 0;
}

h2 a:link, h2 a:visited {
text-decoration: none;
color: #FF582E;
}

h2 a:hover {
color: #FF582E;
text-decoration: none;
}


that will make that it *is* a link but the colour doesn't change so it looks like normal text.


Whoops...we crossposted or something :-)

Went to your site and saw you went to Georgia Univ :-) I love Georgia, have family and friends there, I am from The Netherlands myself.

Usually people are quiet fast helping newbies out here at the support forum.
SpyderFCS
QUOTE (Sproet @ Feb 26 2004, 06:14 PM)
Went to your site and saw you went to Georgia Univ :-) I love Georgia, have family and friends there, I am from The Netherlands myself.

yeah..I am a senior here majoring in Economics. It's a great town here in Athens! Where do your friends live? Atlanta? Anyway, my site is actually my old site since I am almost complete with a re-design. I haven't shown anyone so it's "top secret" biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.