1
Answers
Vote up!
1
Vote down!

Product Title on All Products View Mode

Note: reposted here from Discussions

Ok, so I know the title is a bit misleading, but here's the issue which has irked me for the last hour...

I've setup Commerce from a base 7.22 install, and kept the Kickstart distribution running alongside it for reference. I've managed to get the search facets working on my "All Products" view (view type of Product Display), but under FORMAT > Show > Rendered Entity, I chose Teaser as my view mode.

Now, when I go back into the Product Display > Manage Display > Teaser, I've only made the Product Price and delta0 Image visible...I did the same for Product Type > Manage Display > Teaser. However, when I view my page, the Product Title still shows up above the Product Price and Image. What am I doing wrong?

In the Kickstart demo, I've seen that there's a Node: Product List that is available and is being used by the Faceted Search All Products View...is there any way I can replicate this functionality?

Please let me know if you need more information. Thanks!

Asked by: shalan
on July 1, 2013

1 Answer

Vote up!
0
Vote down!

Hey Shalan,

the default way for Drupal to render a node (for any display mode) is using the node.tpl.php template files.

These templates specifically use the format:

<h2>title</h2>
<body>
  <field>
  <field2>
  <field3>
</body>

The order of the fields in "body" are specified using the "Manage display" page for your product display node / commerce product entity.

You will notice that your title is not is the fields list, and can't be positioned using the "Manage display" page.

You could however use the contributed "title" module (https://drupal.org/project/title) to have a copy of your title into a real field, which can then be positioned amongst your other fields, using the "Manage display" pages for any view mode.

It will also allow you to properly translate the title field using Entity Translation, rather than the built-in drupal translation mechanism.

Greets,
Kim

Answer by: kim.kennof
Posted: Jul 3, 2013