Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Blog h2 h3 title tags


Go to End


19 Posts   4732 Views

Avatar
steve_nyhof

Community Member, 224 Posts

15 November 2009 at 4:17pm

<h4><% _t('VIEWINGTAGGED', 'Viewing entries tagged with') %> '$Tag'</h4>

When I change the H3 tags to H4, nothing changes - any ideas?

Avatar
Double-A-Ron

Community Member, 607 Posts

15 November 2009 at 7:36pm

Edited: 15/11/2009 7:38pm

Hi Steve,

Do you have Firebug? You can use the firebug inspector to hover over page elements to see what styles are being applied and where those styles are located.

This is most definitely a CSS issue, not a Silverstripe one. Without knowing what CSS you have defined, it's impossible to tell you exactly why it's doing that.

I'm picking that you're using blackcandy_blog theme, in which case this is most likely typography.css overriding your custom styling or vice versa.

Aaron

Avatar
steve_nyhof

Community Member, 224 Posts

16 November 2009 at 3:38am

Edited: 16/11/2009 4:08am

Hi Aaron,
Yes, I have firebug and use it all the time.

I make my own themes. I am using 2.3.3, and blog-v0.2.1.

In firebug, the blog is using the H3 tag, and yes it is using my typography.css file for style, but I like the styles I have for the rest of my site, I was hoping to just use a different H tag, or even add in my own style, but I need to know where to make this change. Does seem to matter if I change things in the BlogHolder.ss or BlogHolder.ss files, or BlogSummary.ss or others.

Even tried adding in some extra css into the css files in the blog.

Also browse by date gives an error - http://landingpages.ws/blog/2009/11

I tried to change the tagcloud css file for a little smaller fonts and it does nothing as well.

When I do a search for blogcontent as found here - this is the only page <div id="BlogContent" class="blogcontent typography">
Where is the id= and class= styles, or what???

I would be happy to just use a custom css file for the blog.

---

I was also wondering where you change the date format - 14/11/2009 to 11/14/2009 d/m/y

Avatar
Double-A-Ron

Community Member, 607 Posts

16 November 2009 at 9:34am

Hi Steve, I'm not sure I understand your problem. I have gone to your blog, selected a tag and inspected "Viewing entries tagged with" text. Currently it is set to <h4> with blue text, and smaller font than the red <h3> tags above and below.

It is using .typography h4 in typography.css. The H3 tags are using .typography h3 in the same file.

Now I can use firebug to change your h4 tag to an h3 and the style changes as expected (to match every other h3 tag on the page).

I don't see the problem to your original question.

Re the error for browse by date: Noone will be able to help you unless you put your site into dev mode and post the exact error output. You do this in /mysite/_config.php by adding the line: Director::set_environment_type('dev');

Re the dates, are you asking to output the dates in US format? You have d/m/y at the end of that line so I'm confused.

Ta
Aaron

Avatar
steve_nyhof

Community Member, 224 Posts

16 November 2009 at 10:04am

Edited: 16/11/2009 10:05am

I'm sorry I'm confusing. Lets take this one step at a time, and I appreciate your help.

I agree the H3 and H4 are there to inspect and are using the typography.css file.

Currently my H3 is set to red, which I want to keep on all other pages. However, on the blog, I do not like the red. So I thought I would just change the H3 tag to an H4 tag. But I do not know where to do this.

Or... I can make a custom H3 tag for the blog - but how?

Avatar
steve_nyhof

Community Member, 224 Posts

16 November 2009 at 10:12am

Action '2009' isn't allowed on class BlogHolder_Controller

I set the config as you asked - this was the result of clicking on the date

Avatar
Double-A-Ron

Community Member, 607 Posts

16 November 2009 at 10:43am

OK First the CSS

As you want granular styles just for the blog, you are better off adding more specific styling to /blog/css/blog.css (your blog folder is actually called /blog-v0.2.1 - I'm not sure if this will create problems for you, fo some modules it does, others no biggie)

.BlogError {
text-align: center;
}

.BlogError p {
color: #fff;
display: inline;
background-color: #f77;
padding: 7px;
font-weight:bold;
}
h3 {
font-size: 1.5em;
padding-top:4px;
font-weight:bold;
color: yellow;

}

I assume that h3 tag is your custom, but it is being overridden by the style set in typography. Try this:

.BlogError {
text-align: center;
}

.BlogError p {
color: #fff;
display: inline;
background-color: #f77;
padding: 7px;
font-weight:bold;
}
h3 {
font-size: 1.5em;
padding-top:4px;
font-weight:bold;
color: yellow;

}

You could try changing that h3 tag to:

.BlogError {
text-align: center;
}

.BlogError p {
color: #fff;
display: inline;
background-color: #f77;
padding: 7px;
font-weight:bold;
}
#BlogContent h3 {
font-size: 1.5em;
padding-top:4px;
font-weight:bold;
color: yellow;

}

It looks like you have already found where the template is located to change the tag completely. Otherwise you wouldn't have had the code "<h4><% _t('VIEWINGTAGGED', 'Viewing entries tagged with') %> '$Tag'</h4> " in your first post.

Aaron

Avatar
Double-A-Ron

Community Member, 607 Posts

16 November 2009 at 10:46am

The error:

Search is your freind :-)

I pasted the entire error into the forum search and this came up on top. It should help:
http://www.silverstripe.org/blog-module-forum/show/265986#post265986

Aaron

Go to Top