DRUPAL, Views: I cannot change theme from Views settings - drupal

I cannot change the css theme of my Drupal View. This is a screenshots of the settings:
http://dl.dropbox.com/u/72686/viewTheme.png
I've tried all buttons, I cannot save the new theme (BlueMarine) in the preferences. It is stuck on Zen (which is my front-end theme).
thanks

That dropdown in the image you link to is only showing you what the appropriate template files are in each theme. If you want advanced theming you could use something like http://drupal.org/project/themekey, or customise an existing theme.

What you see there is not a setting to change the theme of the view, but a tool to see what template files views can find and will use. You can use it to figure out what to name your template files you want to use for overrides. Views let you select which theme you want to see what template files will be used. The label also explains what it is used for very well: Theming infomation. It also states that
This section lists all the possible templates...

Related

How to set different colors in the title for WordPress

I am new to WordPress. And I want to set diffrent colors in the title of the customizr theme.
How could I finish that? I know that if withou WordPress, I could use css and span tag finish that like how to set different colors in html in one statement.
But how could I do that in a WordPress theme.
You still have to use css. If you want to edit the theme, locate the theme folder first. Go to wp-content/themes/customizr or whatever the theme folder is.
Usually the title can be found in few different files: single.php, page.php, index.php, etc., it depends from theme to theme. Many developers include templates inside each of these files too. Again, everything changes from theme to theme.
My recommendations is to create a child theme to perform any customization. Also I recommend reading the codex to know more about WordPress development and theme development, that way you learn more how things come together and work.

In Drupal 7, I've created a subtheme, how do I assign that theme to a particular page?_

So I have my parent theme and my subtheme both enabled in Drupal 7.
I've specified in the .info of the subtheme that the base theme is the parent theme.
Once I create a page, how do I tell that page to inherit my subtheme?
Any help would be greatly appreciated.
EDIT:
So what I want to do is create several new pages (about 20) that are going to follow the same template file as the rest of my Drupal site. However, they are all going to have different background images, link colors, and heading styles. I figured the Drupal subthemes would let me create a page that inherits the main stylesheet, but lets me modify it as needed for the new pages. Sounds like that's not what subthemes are for.
Thanks to Matt V:
Subthemes allow you to use an existing theme as the starting point for creating your own custom theme.
I may be wrong but if you want to implement different themes on different pages, it sounds like what your looking for is "hook_custom_theme", it's pretty straight forward, basically you just add:
function mymodule_custom_theme(){
//Some custom logic here
$node=node_load(arg(1));
if($node && $node->type=="my_custom_type"){
return 'my_custom_theme';
}
}
your return value must be a string that equals the machine readable name of the theme you're switching to...
re-reading your post, you may want to look into the template_preprocess_html and template_preprocess_page functions. Inside of these functions you can set and alter your template variables, i.e.
$vars['styles']=drupal_get_css();
once you've done that you could easily swap out css tags with a little bit of logic, this method would allow you to only use one theme with multiple css files....
to activate a subtheme, you need to enable it and set it as default.
The subtheme (or any theme for that matter) is for the site as a whole. To theme an individual page you could create a template for that specific page, or use the Panels module - there are many ways to skin a cat in drupal.....
here is some more info Drupal 7 theme system changes
By using themekey module you can achieve this
Refer http://drupal.org/project/themekey
To have your theme activated site-wide and used as default for ALL pages, you need to go in admin/appearance and activate your theme, and then click on the link beside the theme "Define as default".
To have your theme used on one specific page, that would be a bit trickier to do, just clarify if that is what you really wanted.

How to style module?

How to style existing module in drupal 6 for a specific view? where to place files? in the module directory or in the views dierectory. I just need to override the style of the node.
Thanks!
The second question: where do you place hook_form_alter functions? thanks!
To override the style of a node, the default templates suggestions allow you to create a node-[type].tpl.php file in your theme directory. The [type] is the name of a specific content type you are overriding or theming. For instance, you could create a custom template for "Page" nodes in a node-page.tpl.php file. If you need more flexibility, you can create custom "suggestions". See Working with template suggestions for more details.
When creating new template files, make sure your theme already contains the base template file (see the note at the top of the Core templates and suggestions page, for more detail). Also, be sure to clear your theme cache, in order for any new template files to be detected.
Views can be styled separately from the nodes they contain. Views allows for a variety of template files to be customized, depending on what level you need to customize (view as a whole, row styles, field styles, etc). For more details, click on the Edit tab of a view you'd like to theme, look under the Basic Settings section and next to Theme, click on Information.
Like other hook functions, implementations of hook_form_alter are placed in a .module file. If your module is called "customized" your customized_form_alter function would typically be found in a customized.module file, in a /customized folder, under /sites/all/modules.

Drupal: how to change taxonomy header on page with items?

I have a menu item like
http://localhost/drupal/?q=category/articles/php
It's supposed to output all stories about PHP,
But in resulting page header (with term name (PHP) ) doesn't look very well.
How can I remove header or change its CSS style?
Your best bet for customizing the page is to use the Views Module and activate the taxonomy_term view. Then, you can add to the header field or even create a new template just for that view.
The Drupal Handbook has a lot of great resources for theming and building views:
http://drupal.org/node/352970
Take a look at Drupal's theming guide:
http://drupal.org/theme-guide
You'll need to understand theming to edit css or html.

What is the difference between a theme and a template?

I am trying to migrate my site to Drupal and I am confused about themes and templates. The look and feel of the pages in my current site are completely controlled by template files and CSS. How does it work in Drupal?
In drupal, a theme handles the appearance of the site and a template handles how your content is rendered.
Think of it like this: the template is used to render the content, then the theme is applied on that content.
Edit: So, your css files live with the theme in drupal, and have nothing to do with the templates.
In Drupal, a "theme" is just a special type of plugin that bundles together any number of templates (to control how a given piece of data gets rendered to HTML), CSS, JS files, images, and so on.
So, there is a single "template" for your oveevral page markup, a single "template" for how a sidebar block is rendered as HTML, and so on. All of them, bundled together and named, are referred to as a theme.
Look at it this way: It's possible to create a theme that has no templates. Such a theme would have CSS files that override drupal's default CSS files. Using such a theme would create a website that looks almost exactly like Drupal's default site, except it would have different colors, fonts and so on.
But if you want to change the positions of items on the page, what kinds of items are on the page and so on, you have to override the default templates by adding some of your own to your theme. These new templates let you alter what information Drupal displays and what kind of HTML Drupal will use to display it.
For example, say I want to clone StackOverflow, but I want to do it with Drupal. First thing I would do is create a new content type (call it a "question") that is just like a story but has extra fields to track voting and so on. Drupal's default templates won't know about these extra fields, so they won't display them.
So, what I do is I go into my theme and I add a new node.tpl.php file. This new template is just like the standard one, except I can add code that says "if this node is of type 'question', insert the voting gadget to the left of the body."
Does this help?
A theme is made up of a collection of template files. block.tpl.php, node.tpl.php, page.tpl.php are all template files which when combined with your CSS, JS and images produces a theme. In addition a themes can be inherited. A theme can be created with just CSS and no additional template files by inheriting from an existing theme, in which case the template files from the parent theme are used.
Another way to look at it is a theme is what you see and the template files are responsible for generating the markup.
I hope this makes it a little bit clearer.
I'm confused...
The first answer says that templates and themes have nothing to do with each other, while the second one says themes are just collections of answers.
Which one is right?
Drupal is having a template based theming system. You can define your own regions in page and can arrange the content according to that . There are some default template file such as page.tpl ,block.tpl ,node.tpl which are displaying different kind of contents .
You can write your own template file as needed for eg if you need to alter the display of user registration form or login page you can create a tpl file for that and have to redirect the data to that tpl file. You can add the css or js to these templates using drupals apis. This redirection has to be done in the themes template.php file
A theme is comprised of css, js, images, and template files. Each theme may include multiple template files.
Additionally, themes can be inherited, and a subtheme's template files could override the template files of its parent theme.

Resources