remove header item functionality

Permalink
Can anyone tell me if there is some way of removing a particular header item.

I've been looking at the view class, and only see functions to add headers, and to get, and output headers.

It would be really great to be able to set the header, or remove a header item.

proverbed
 
Adreco replied on at Permalink Reply
Adreco
Have you viewed and edited the header.php file for your theme yet? It is typically inside the "elements" folder.
Usual path for added themes is Packages - "Theme Name" - themes - "Theme Name" - elements

For default themes installed with C5, follow concrete - themes - "Theme being used" - elements
mhawke replied on at Permalink Reply
mhawke
@proverbed... What are you trying to remove?

@Adreco... your answer suggests that it's a good practice to actually use the core themes in '[root]/concrete/themes'. If someone wants to use one of the core themes, they need to copy that theme folder from '[root]/concrete/themes' and rename it and save it in '[root]/themes' and install that new theme. If you just modify the core themes in their original location, all your modifications will be wiped out as soon as you upgrade to a new version.
proverbed replied on at Permalink Reply
proverbed
Im trying to remove a css file, from my block, a css file that I've added with the addHeaderItem() function.
mhawke replied on at Permalink Reply
mhawke
I'm confused... can't you just go into the block and comment out or remove the code that adds the css in the first place.

If you are talking about removing specific css rules dynamically after the page is rendered, you can use jQuery to manipulate things. Once the server has served the page, the css rules live in your browser. To use something like removerHeaderItem would require another trip to the server to have the page re-rendered.

Can you explain a bit more about what you're trying to solve/accomplish?
proverbed replied on at Permalink Reply
proverbed
I want to dynamically remove a css file after its been rendered in the browser, and like you said, it would require another trip to the server
mhawke replied on at Permalink Reply
mhawke
I know of no function within C5 that would do that except posting a form to different file which doesn't contain that css file. This is typically done in the client with jQuery such as

$('#Target_Element_ID').removeClass('SomeClassName');

Can you tell us why you want to do this? Perhaps there's an easier way.
Adreco replied on at Permalink Reply
Adreco
@mhawke
Of course, My apologies everyone... careless of me not to mention copying and moving. I actually edit from an archive copy on my desktop and then upload via ftp to the new folder.
proverbed replied on at Permalink Best Answer Reply
proverbed
I've worked around this by simply rendering the css inside

<style type='text/css'>
.some_css_rule{
   color:blue;
}
</style>