Help - Search - Members - Calendar
Full Version: Putting links on certain category archives
Movable Type Community Forum > Using Movable Type > Entries and Archives
knoir
A fellow webmaster has asked me to place a link to his website in one of my category archives page. The problem is, my pages are built in PHP.

How can i make it so that i can place a link to a website only in certain category archive pages.

Lets say, an external link to a search engine on the search engine category archive page. An external link to a major credit card company in the credit card category archive page.

Is there a special plugin to allow me to do this?

Thanks.
knoir
I ask this because everytime i rebuild a page, the link will be erased.
cowm007
One way i can think of doing this is to use a php include file using the <$MTArchiveTitle$> as a variable.

For instance, lets use your example with the Search Engine category and the Credit Card category. So you make a php include file with the html code of the seach engine link and name it Search_Engine.inc Then you do the same for credit card link but name that one Credit_Card.inc.

Then put these files in a folder on your website, lets say www.yoursite.com/phpinc/. So when you want to embed the tailored link into your page, you just do the php include code:
CODE
<? include "/path/to/your/files/<$MTArchiveTitle encode_html="1"$>.inc"; ?>

This way, every page can have it's tailored links just as you need them.

Let me know if this was confusing or if you've got any other questions, hope this helps.
jmesam
Try this way:

CODE
<MTCategories>
<MTIfCategory name="News">
your own link
</MTIfIsCategory>
</MTCategories>
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.