recentpopularlog in

therobyouknow : theme   105

« earlier  
8 - How can we get Block Bundle Type for block in code? - Drupal Answers
use \Drupal\block_content\BlockContentInterface;


/**
* Implements HOOK_preprocess_block().
*
* @param $variables
*/
function mymodule_preprocess_block(&$variables) {
$content = $variables['elements']['content'];
if (isset($content['#block_content']) && $content['#block_content'] instanceof BlockContentInterface) {

if ($content['#block_content']->bundle() == 'xxx') {
// ...
}

}
}
8  drupal8  drupal  web  dev  cms  computing  module  theme  block  update  refresh  force  cache  disable  twig  specific  howto  question  answer  problem  solution  time  computed  generated  calculated 
march 2019 by therobyouknow
theming - How do you theme a content type's create/edit form in Drupal 7? - Drupal Answers
great answer - one that I'm using, however it doesn't cover multiples of a specific field
theme  custom  field  hide  drupal  form  input  contenttype  edit  computing  web  dev  cms  howto 
september 2013 by therobyouknow
Render view's exposed form anywhere in a theme/module | Drupal snippets
/**
 * Returns rendered exposed form for a given view.
 * $view_name
 * - A string with a view name,
 * $display_id
 * - A string with a name of view display,
 * @return
 * Rendered exposed form.
 */
function MY_MODULE_render_exposed_form($view_name, $display_id = 'page') {
$view = views_get_view($view_name);
$view->set_display($display_id);
$view->init_handlers();
$form_state = array(
'view' => $view,
'display' => $view->display_handler->display,
'exposed_form_plugin' => $view->display_handler->get_plugin('exposed_form'),
'method' => 'get',
'rerender' => TRUE,
'no_redirect' => TRUE,
);
$form = drupal_build_form('views_exposed_form', $form_state);
return drupal_render($form);
}
Render  views  exposed  form  anywhere  theme  module  obtain  computing  web  dev  cms  howto  dropbucket  code  snippet  drupal 
september 2013 by therobyouknow
Drupal 7 Template (Theme Hook) Suggestions | drupal.org
file you'd use for your content type - it would be comment-wrapper--node-[type].tpl.php where [type] is the name of your content type. Examples: if your content type is called question, then the file would be comment-wrapper--node-question.tpl.php. If your content type is called Resource Article (note the space!) then the file would be: comment-wrapper--node-resource_article.tpl.php - note the space is replaced with an underscore _ Works for me, based on official documentation
comment  wrapper  template  theme  hook  content  type  contenttype  specific  official  community  documentation  drupal  computing  tpl  web  dev  cms 
september 2013 by therobyouknow
Block Class | drupal.org
assign css to block class for theming
css  block  drupal  computing  web  dev  cms  class  theming  themeing  theme 
july 2013 by therobyouknow
Mothership | drupal.org
cleaner markup, fences and displaysuite help as well with views etc.
theme  mothership  drupal  cms  web  dev  computing  theming  div  reduce  reduction  cleaner  markup  output 
july 2013 by therobyouknow
Drupal Questions & Answers Theme / Module - Q&A Theme | ThemeSnap.com
interesting point about user generated content helping SEO and traffic to a site.
qanda  qa  computing  web  dev  cms  drupal  premium  theme  solution 
june 2013 by therobyouknow
Fences | drupal.org
Looks like a great Drupal module to control the meaning and presentation of output from Views
css  theme  webdev  cms  computing  views  views3  drupal7  html  field  fences  semantic  module  theming  html5  drupal 
september 2012 by therobyouknow
« earlier      
per page:    204080120160

Copy this bookmark:





to read