Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 1:
Changing Article Title Color Under Latest Headlines

 

 


gary
User

Jun 13, 2002, 12:44 PM

Post #1 of 4 (4290 views)
Shortcut
Changing Article Title Color Under Latest Headlines Can't Post

Hello.
I'm modifying the default templates in Article Manager. Can anyone tell me how to change the color of the article titles which appear under the Latest Headlines list? Can't find this anywhere.
Thanks in advance...


Luke
Staff / Moderator


Jun 13, 2002, 5:43 PM

Post #2 of 4 (4283 views)
Shortcut
Re: [gary] Changing Article Title Color Under Latest Headlines [In reply to] Can't Post

Hi Gary,

In order to change the font color of the 'Latest Headlines' list you'll have to modify the appropriate CSS properties.

Article Manager's 'Latest Headlines' are output using two different template files, these are /templates/headlines_bycat.html and /templates/headlines/default.html. In this example we'll work with the headlines_bycat.html template file.

If you open the headlines_bycat.html template file in an HTML/text editor of your choice you'll notice that the text color of the headlines is being defined by a CSS class attribute in the <td> tag called 'toplnk'.

<td class="toplnk"><a href="$url_index$#$art_num$">$art_name$</a></td>

These CSS properties are being defined in the /index/default.html and /article/default.html template files. Let's open up both of these files in an HTML/text editor. If you look at the CSS definitions at the top of code (between the opening and closing <style> tags) you'll find the '.toplnk' style.

.toplnk { font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: regular; }

You can now modify this style and add a font color to it. Here's how you would change it to red.

.toplnk { font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: regular; color: #FF0000; }

Unfortunately doing just this won't be enough as the headlines will still be output in your browsers default link color. (the default browser color for links, which is usually blue, will take precedent over font colors that were defined outside of the opening and closing hyper link tag <a href>)

The easiest way to fix this (in the headlines_bycat.html file) is to just move the "class" attribute tag over from the <td> tag and into the hyper link tag <a href>

e.g.

<td><a href="$url_index$#$art_num$" class="toplnk">$art_name$</a></td>

And that's really all there is to it!

Once you're done with these changes you'll want to republish all of your existing articles and content so they can adopt the changes you just made to the HTML template files. This can be done by going to the 'Setup Options' and clicking the 'publish all' button.

Let me know if this works for you. If you need me to explain things in more detail feel free to email me at support@interactivetools.com or call me on our toll free number at 1-800-752-0455. :)
Luke Holzken
Product Development


Dave
Staff / Moderator


Jun 14, 2002, 9:12 AM

Post #3 of 4 (4270 views)
Shortcut
Re: [gary] Changing Article Title Color Under Latest Headlines [In reply to] Can't Post

One of the reasons it's a little tricky is that you want to change the link color. While it's generally easy to change the color of all the links on a page in HTML, it's a little more involved to change just a few.

The reason there is two different templates to update is because they both publish different types of headlines:

/templates/headlines_bycat.html - this lists the top headlines from each category in one big list and is usually shown on the front page.

/templates/headlines/default.html - this lists the top headlines from one category only and is usually shown on the side of the article pages.

Once you find the link code in the templates, you can either modify the CSS (Cascading Style Sheets) and move the class attribute to the anchor tag like Luke suggested.. or .. If you're more comfortable with plain HTML you can put a font tag with a color _inside_ of the the <a href=""> tags like this:

<td class="toplnk"><a href="$url_index$#$art_num$"><font color="red">$art_name$</font></a></td>

Since the font tag is _inside_ the anchor tag it allows you to override the default link color that would have been displayed by the browser.

Dave Edis - Senior Developer
interactivetools.com
 


gary
User

Jun 14, 2002, 12:48 PM

Post #4 of 4 (4262 views)
Shortcut
Re: [gary] Changing Article Title Color Under Latest Headlines [In reply to] Can't Post

Thanks for your help--that did the trick.

BTW, Article Manager is a sweet application. You guys did a great job.