Drupal removing pointless span classes - drupal

I am working on a Drupal site here: http://selkirk.treethink.net
I have a couple modules that are firing out an insane amount of span classes, which you can see in the source code there.
Nice menus is one of these and is causing 60% of them. I need to prevent these modules from doing this but I can't seem to find the code that's doing this in the module source.
Do I have to write something to cancel it out or override the module theming? I'm not sure how to do this though as this is my first Drupal project.
Here is the nice menus page: http://drupal.org/project/nice_menus
Thanks,
Wade

I'd agree with googletorp's comment. It sounds like the source of the spans is the Devel module's "Theme Developer". It's a very handy module, but it adds a span around every theme call in order to do its work.
The Devel module provides a block titled "Development". Go to Administer > Site building > Blocks and place that somewhere handy in one of your regions. It has a link for quickly toggling the Theme Developer module. I'd only enable it to check on something, and then immediately disable it again.
If it is actually Views layout that you need to override, you can edit your view and click on "Theme: Information" for a list of views templates you can override for that view/display.

Related

How do I turn off QuickE for just one module?

I have a page with a few modules on it. On one, the QuickE menu is not useful and actually gets in the way of other functionality (DNN's action menus AND 2sxc Edit toolbar). I found the docs and was able to turn it off for the whole page, but that is not what I want. I do want it on for all the other modules, just not this one. This one is a 2sxc custom app and I was hoping to be able to disable QuickE from the View code. Is that possible or supported?
This is pretty straight-forward, you can disable QuickE for a certain section of the theme, and that section can of course be your module. Technically QuickE scans for the html attribute quick-edit-config and respects that for everything inside that html-node. See https://github.com/2sic/2sxc/wiki/Html-Js-%24quickE

How to change page code in Drupal?

I need to change page site_name.com/user/sites (Add button, for example). Where can I find its code? I tried to search in site_name.com/admin/modules but there are too many of them.
EDIT: Sorry, the question is closed. After day of struggle I gave up. Drupal is not for me.
You can consider creating a template file for that page. Try using page--admin--modules.tpl.php.
Check this out: http://drupal.org/node/1089656
/user templates are found in the user module. You can find 4 user templates there.
To know which one to override you can use the Devel Themer module.
It provides you a checkbox at the bottom of the page and when enabled it shows the candidate preprocess functions and template files for particular regions. (As described on the module page, only enable the module is needed because it can mess up the lay-out of some pages.)

Limiting menu management

I am creating a website with Drupal 6.x that will have several content editors and several menus. I would like to somehow lock down their ability to add a piece of content as a top level navigation item. Is there a way to accomplish this?
Additionally, are there any modules that make the menu drop down in the content creation page a bit more user friendly?
The menu settings per content type module allows you to determine which content types may be added to each of your menus.
Are you sure you want to use the menu system? It's possible that you can use the views module to get something more flexible.
I have found several modules which look helpful for enhancing the menu system:
http://drupal.org/project/menu_editor
http://drupalmodules.com/module/menu-weight-assist
http://drupalmodules.com/module/ez-menu
http://drupalmodules.com/module/better-menu

How can I disable DHTML menu on one of my drupal menus?

I am new to drupal so forgive me. I made a menu and it was automatically created as a DHTML menu. I wanted to style the menu myself and just simply want the 'ul.menu' tree to be printed. Instead, it's doing some javascript and unnecessary CSS. can i disable DHTML menu for this particular menu?
thanks!
If you are using DHTML Menus module, and are asking how to disable it for certain menus, then it should be possible via the configuration in Administrator > Site Configuration > DHTML Menus (as suggested by this and this discussion). Looks like they had this feature in v2.2, then lost after switch to 3.x, and re-included around 3.2 or so.
But you didn't specify whether you use this module or not, so my answer may be completely off due to lack of information.

How to theme a view in drupal

Can any one help me out on how to theme a view.
For each view created i want to have different templates.
Theming views can be somewhat tricky, depending on the kind of views you have created and the changes you need to make. Check out this introduction for Views 2, and make sure to install the Advanced Help module to get at the views2 documentation from the views module itself (there will be a link to the documentation on your views overview and edit pages, once you activated the Advanced Help module).
You can also find some questions/answers here on SO (e.g. Drupal 6: How to quickly theme a view?), if you search a bit.
I actually did this the other day. Ill give you a brief overview and expand a little later.
Set up your view; by going to Views -> Add View
Once, your view is completely set up, at the bottom of the view (left column in D6, right-most "Advanced" column in D7), you will see a link called "Theme: Information", click on it.
What you will be presented with is a list of templates (.tpl.php) files that the views uses to theme your data. Basically the file names that are bolded are the files views is using to theme the data.
To Customize Your Views
Select the page you need to theme. For Example, if you created a "Block" view, and I wanted to customize the basic html layout, I would pick a name (other than the one that is currently bolded) that is being displayed to me and create the file in my themes directory (sites/all/zen/custom-file-view-fields-views.tpl.php) - this is if views told me that I could use the filename custom-file-view-fields-views.tpl.php
The next step is knowing what code you need to put in there. The quickest way, is to go back to the theming information in views, click on the link of the file your replacing and grab the code that is presented to you. Paste that code in the file you created.
From here on out, you can now successfully customize that view.
Keep in mind that the theming information presented to you is presented from basic to complex (up to down). So choose which file you need to edit carefully. Ill put up some images in this answer a little later.
Hope this helps! Cheers!
Is there something specific you're trying to accomplish? There's a lot of ways to "theme" a view, unless you mean "theme" in the strict Drupal sense.
Personally I just give the fields classes and use those, rewriting the output to include variables as classes if need be. This tends to be easier and more manageable than modifying TPL files directly.

Resources