Travelhost

This website caters to the online travelers to find local attractions & rate it. It is a one stop solution website for finding latest in events, articles and deals for a local and national attractions. It also provides publishers to publish their magazines and articles for tech savvy travelers.

Sectors: 
Entertainment
Travel and Hospitality

template.php vs mytheme.theme

Hello,

I'm in the process of migrating a site from drupal 7 to drupal 8 and I'm having a problem with where or how to implement functions I had in my template.php file.

For example in drupal 7 I have this function in my template.php file:

function some_function($var1, $var2){
print $var1 . $var2;
}

I call the function from a template file like this:

<?php some_function('Hello', 'World'); ?>

How and where would I implement something similar in Drupal 8.

Update the text displayed in an entity reference field

Can anyone point me in the right direction to change the displayed text in an entity reference field after I have selected from the auto complete, I ve managed to change what is displayed in the auto complete, now I want to add that change to the actual entity reference field, looking for a tutorial or guidance to learn from

Thanks

User cant access taxonamy(who have privilage)

I have create a form using taxonomy

Hr_taxonomy_form

And i give privilege to role HR to access Taxonomy.but when user login with role HR can't access taxonomy page.Why?please help me

How to implement custom maintenance-page.html.twig in drupal 8 ?

I need to add custom maintenance page twig file in Drupal 8 so that I can print some block region for example header image same as page.html.twig. I also used maintenance-page--offline.html.twig but that also does not work for me.

 

Webform field custom validation, how can I do it?

Hey,

I want to do a custom validation for a field in some of my webforms.
I came across this code:
https://www.drupal.org/docs/8/modules/webform/webform-cookbook/how-to-add-custom-validation-to-a-webform-element

this is the data from the webform devel
the field I want to do the validate on id calle `idno` 

I don't understand:
1.what are the values:
 

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x