How change font for summary/detailed template in NEWS module ???

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Simon

How change font for summary/detailed template in NEWS module ???

Post by Simon »

Hello,

1st of all.. GREAT CMS. I gave it a 5.0 rating because this is the finest one that i can handle.

Now I got some pages online. All works cool. But one thing is still a problem for me, and I can't find it anywhere on this forum:

can please somebody help me how to change the font etc... for both templates in the news module?

When I see my news module online, I only see the basic fonts. I mean title, category, date, read more...)


That I want to change those variables to the fonts I use for the rest of the site but I don't know how the accomplish that.

Can please anyone can help me with this???

Thank you

Simon.
westis

Re: How change font for summary/detailed template in NEWS module ???

Post by westis »

Hi Simon,

If you check the template tabs in the News module (Content -> News in the Admin Panel and the Summary Template and Detal Template tabs) you see the classes and id's used. Then you set styles for those classes and ID's in your stylesheet.

For example, in the detail template you see around the date tag. In your stylesheet you set the style for the date like this:

Code: Select all

#NewsPostDetailDate {
  font-family: Verdana;
  font-size: 11px;
}
You can also set a custom style for each tag (title, date, category etc.). You could either use or tags for this.

For example for the date in the Summary template:

Code: Select all

<span class="postdate">
({$entry->postdate|date_format:"%d %B, %Y"})
</span>
Then in your stylesheet:

Code: Select all

.postdate {
  font-family: Verdana;
  font-size: 11px;
}
Hope that helps.
Simon

Re: How change font for summary/detailed template in NEWS module ???

Post by Simon »

Hi,

Thanks for the quick input. Unfortenately it didn't helped.

What I did was: create a new stylesheet, and put those variables in it as mentioned in your example.
I even put a tag in the news template as mentioned above

Next thing I did was to link the stylesheet with the NEWSpage I created. But nothing happened. It still looks the same as before.

If my steps above are wrong, what would be the right step to do then? I'm confused :-(
westis

Re: How change font for summary/detailed template in NEWS module ???

Post by westis »

I'm not sure how many stylesheets you can link to a page, but I suppose you should be able to link more than one. But if you're stylesheet in the template (Layout->Templates->YourTemplate) is not empty it will use what is there INSTEAD of whatever stylesheets you attach separately through Layout->Stylesheets.

At least that's how I understand it working. So try put your CSS for the menu in the stylesheet section under the template or empty the stylesheet box there and put it in a separate stylesheet, together with the css for the news.

Hope I made myself clear. Let me know if you get it working or I'll try to find other possible solutions.
Simon

Re: How change font for summary/detailed template in NEWS module ???

Post by Simon »

I understand it very well. Thanks.

I already did that... or link an external stylesheet next to it, or put the css code directly in the stylesheet code.

But none of them works what makes it very strange.

Ok: the whole scheme:

1) I created a new template in admin-design-templates in the [content] section with the name 'news':


 
    {content}
   


2) I create a page in the admin-content-page section
3) then, with the pulldown, I gave it the content-type: news
4) Then I went to admin-content-news and create a category
5) Then I made a news item with a title and text (summary and content)
6) saved it.
7) watched the page to go back to the admin-content-page section and click the view button

Did I do something wrong here? May that's why the css thing does not work???
Simon

Re: How change font for summary/detailed template in NEWS module ???

Post by Simon »

No i did not. there is no css style attached to the news template. I did that, but no results in the page. (there was no difference)

Then I put in the template directly this css style:

#NewsPostDetailDate {
  font-family: Verdana;
  font-size: 11px;
  font-color: #0082fb
}
.postdate {
  font-family: Verdana;
  font-size: 10pt;
}
.titlelink {
  font-family: Verdana;
  font-size: 10pt;
}

But even then: no results in the NEWS page.

It is like the newspage is not responding on the connected stylesheet!!! :(
amygdela

Re: How change font for summary/detailed template in NEWS module ???

Post by amygdela »

You know that's not true, there's gotta be another problem, and I think it's just that your CSS document is switched off/not active.

Can you post an online example?
Simon

Re: How change font for summary/detailed template in NEWS module ???

Post by Simon »

I know it's not true, but I tried to express the feeling that have on my cms. :)

But how do you mean exactly with switched on/off??
Locked

Return to “CMSMS Core”