Skip to content

Instantly share code, notes, and snippets.

View Codenator81's full-sized avatar

Alex Poltarjonok Codenator81

  • MGP Digital
  • Latvia
View GitHub Profile
@Codenator81
Codenator81 / tag_preprocess.php
Last active January 11, 2016 22:53
Drupal 8 - Add to views field link class when fields is taxonomy referenced entity
// Drupal 8 developper http://codenator.org
function THEMENAME_preprocess_views_view_field__field_tags(&$vars) {
$rendered = $vars['field']->getItems($vars['row']);
//added icon on front of tags
$renderedArray[] = [
'#markup' => '<span class="glyphicon glyphicon-tags" aria-hidden="true"></span>'
];
if (is_array($rendered)) {
foreach ($rendered as $one) {
//dpm($one['rendered']);
@cjus
cjus / sample-nginx.conf
Last active July 12, 2023 14:59
AngularJS Nginx and html5Mode
server {
server_name yoursite.com;
root /usr/share/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}