This forum is for assistance with theme development.

Body classes based on user permissions

Hey everybody!
Hey guys!

I have a question about the body classes on Drupal:

- How do I add a class in body tag based on users permissions?
For example: If the user has the role "editor", any page that he views will appear in body tag a class like "logged-role-editor" or "logged-role-editor-user-nameoftheuser".

- Do I have to put some code in template.php? If so, can you post it?

Thanks a lot!

Bootstrap Starterkit theme div's are not floating?

Hi,

i am building a Drupal site based on the Bootstrap starterkit theme.

http://meesfrenkelfrank.com/bootstrap-test/

In this example i put all the JS and CSS files on my server to show the output. I put all the LESS CSS files in style.css

But it's very strange the div's are not floating? The sidebar is going under the main content instead on the right side...?

I find out the width of and are rendered to wide:

theme commerce_kickstart_theme

hie

i use the commerce_kickstart_theme

from this site , i try to obtain this result http://www.bougiz.fr/

with a div that stand out from the background (using box-shadow)

i find the solution to create a div that contain the main div and apply white background and box shadow

the main div are :
region-branding
region-menu
zone-content

i try to add a div from maintenance-page.tpl without success
does i must use a another template to add a div ?

User Account Profile Template

Hi,
I am having trouble editing the User fields when you go to login (for example admin) there is a template that shows forms that you can edit your information, how do I edit the template on which these forms are in?

Which file in drupal directory is displaying the page when you are in "http://www.website.com/?q=user" < i need to know how to edit this template or tag or i have know idea what is controlling this page.

Shortcut links in toolbar

Hi,

On my Drupal website, I created a role, called "editor". When a user with this role logs in, he can see the toolbar + shortcuts bar.

The problem is in his role, he doesn't need any links in the toolbar except of the "home icon" and "Content". In the shortcut bar, there are 6 shortcuts links.

Now. I think it's a bit stupid to use 2 bars because all the information can be collected into 1 bar. Is there a way to disable the toolbar but keep the shortcuts bar or collecting the two of them?

Add css class to a desired div

Hi Every one

I am trying to solve a problem related to adding div css classes in innermost div.
I tried the following code also

function THEMNAME_preprocess_html(&$variables) {   
    $variables['classes_array'][] = 'my-new-body-class';
} 

but it adds class only in body tag.
Actually I want to add css class into a view, I edited the view and added the css class there, but it only added a class in outer most div only.So can any one help me on this issue.

Pages

Subscribe with RSS Subscribe to RSS - Theme development