This forum is for assistance with theme development.

how to get taxonomy alias by taxonomy id

in node.tpl.php

I have gotten the taxonomy id :
$taxoid = $node->field_cate_products['und']['0']['tid'];
$term = taxonomy_term_load($taxoid);
print $term->name;

question:
if the taxonomy has alias, how to get it? because I want give the taxonomy name a link.

how to according views page url with taxonomy id

I created a views page,
path is : product
contextual filter is : taxonomy id
so the url will like: product/6 , It works well.

but I use taxonomy menu module to creat the menu.
when I click the menu,the url is taxonomy/term/6 .

question is: why the content showed by product/6 is not same with taxonomy/term/6 ?
how to according them? or other solution?

how to cancel a suggestion file

I have a suggestiong file use $variables['theme_hook_suggestions'][] = 'page__product';
but I want cancel page__product.
how to do it?

Inject CSS to menu

I currently have one of my sub-menu on the high-light of the touch theme. The menu links are currently stacks on one another but I want them to display side by side. I tried to inject css using css injector menu but it doesn't seem to work.

Here is the code I used

#block-menu-menu-university-menu.block-menu-menu-university-menu.content{
float:left;
}

image

Custom theme folder not being shown in admin

I'm having some problem customizing the theme of my 1st DrupalCommerce website.

First, if i drag a theme folder into my sites/all/themes folder it does not get read by the admin when going to appearance/themes. It should display in the disabled theme section. i've checked the permission and they seem to be consistent with other folders

second, on my default core Bartik theme the color controls are not accessible. Also, the +Install New Theme button is missing from the Admin Appearance page, ugh!

Adding custom content template for particular content type.

Hi , I am trying to add a custom page template for a particular content type. When I run, it displays error “The requested page "../field_test" could not be found.” .What I did was ,

1. Changed page.tpl to page--product-details.tpl.php( content type is “machine name : product_details” ).

2. Added this code to template.php page.

Pages

Subscribe with RSS Subscribe to RSS - Theme development