Script: How to hide headline for certain articles?
I cannot just leave blank the headline field cause I need it for Page title. How can I display the article for the website and hide the heading?
Please be more specific. When do you want to show it and when not. Different templates, different media (e.g. for printout) etc.
Adriaan van den Brand
I want to show it only when it's a real article (ie news, writings, blogs). But I need to hide it when it's a permanent website content like the front page, about, contact info.
Use a different template for the articles that you want not to use the headline
I put "(NFP)" (short for Not For Publication) in the Keywords field of articles that I don't want to appear in things like recently-added article lists. All my scripts that list articles (as used on index pages) and recent additions (as used on the main page) exclude articles that have "(NFP)" in the Keywords, so that only real articles get listed.
In the "simple" template that comes with CD there is this code:
Joel C. Goldstick
Thanks. I'll try that script.
Sometimes I put the headline in the headline field; sometimes I put it in an extra field. So, for example, I use the headline as the "headline" to list articles on the home page and extra1 as the "headline" on other pages.
Sorry Charles, I didn't understand what you were trying to do. I thought you were building a list of articles in a loop, and didn't want anything from those articles to appear. My understanding now is that for each article's HTML page, sometimes you want both the headline and the body to be listed, and sometimes just the body. Is that correct?
Fog Creek Home