This forum is for assistance with theme development.

How to add a shopify buy button?

Hi,

Have created a shopify store where we need to add a buy button to the original Drupal site.

I've been away from Drupal for 3 years and am lost. Can I ask for some direction?

Thank you!

Here's the code:

/**/

align images horizontally

Hello
stupid of me, I don't know how to align images on same line. I mean images with field image as in that example :
http://neralala.info/node/178 (mayo)
I know I must change something in CSS, but in that case, what code must I add at the end of style.css to have them aligned?
The name of the field is "mesimages".
I tried

How to manipulate data in theme code?

Hello,

I'm a seasoned D7 developer, and new to D8, but after searching online for quite some time and pouring through the debugger variable values, I cannot find a clear method to manipulate data to pass to a twig template.

Get the parent taxonomy term name in node.html.twig

I have a vocabular with a nested taxonomy tree. I know, I can print the last term name via:

{{ content.field_taxonomy[0]["#title"] }}.

But some terms have a parent term. How can I get the parent-term-name in my twig-template?

Thank you.

Adding External CSS & JS

Hello and good day to you all. I am a drupal novice and am NOT a developer by any stretch of the imagination. I work for a company that had a developer managing our website but since left. So far I have learned how to use Drupal as I have gone along including modifying our hosted files for CSS purposes and changing website layout etc. I have no working knowledge of PHP or JS so bear with me.

Display a field only if option (x) isn't selected

In one of my content types, I have a Status field (field_status) which is a List(text) field displaying 3 radio button options set to the following key|label values:

  • 0|In Stock
  • 1|Under Deposit
  • 2|Sold

I have a custom twig template file for this content type and was wondering how I would display the label value ONLY if the option isn't 0|In Stock. In Stock is pretty much the default option so when the item is sold/under deposit, I want a "Sold/Under Deposit" banner to appear in the upper corner of the picture of the item.

Pages

Subscribe with RSS Subscribe to RSS - Theme development