php - Customize a field output -


i have field named "field_enroll_link." want remove surrounding divs , print field content (it go href of anchor tag). created files "field--field_enroll_link-course.tpl.php" , "field--field-enroll-link-course.tpl.php," , put template folder. contained <?php print render($item); ?>, when cleared cached , switched themes, i'm still getting surrounding divs , markups. how override field.tpl.php in drupal 7?

in theme's template.php file define function , clear cache. assuming have devel module installed.

function your-theme_name_field($variables){ dsm($variables['items'][0]['#markup']); return ; 

}

you able access value looking for.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -