When using Display Suite to reorder and arrange the fields for a View mode of a Fieldable Panel Pane, the position of the Title field has no effect on the output at all. I can put it at the bottom, on the left, in the right... but it always renders at the top. Looks like it's being used as the Pane title, rather than as content within the pane like all the other fields.

Comments

merlinofchaos’s picture

Status: Active » Closed (works as designed)

This isn't a bug. It is intended to be used as the pane title. The pane title is like a block title, and is part of the decoration around the content.

seanr’s picture

Issue summary: View changes
Status: Closed (works as designed) » Active

I think this needs to be revisited. Surely this can be provided somehow as an option? I have a design comp that calls for an image, title, and body in that order. Display Suite allows me to order the fields of the FPP content type in that way, but it has no effect. Furthermore, the title isn't available in the pane template so I can't even do this in the theme layer. Am I to go back to the designer and tell them it can't be done? If the title was at least available there I could do this pretty easily.

seanr’s picture

Category: Bug report » Feature request
seanr’s picture

Status: Active » Closed (won't fix)

Just figured out a way to do this with Display Suite. You need to select a custom layout in Manage Display. Then you get a field called Display Suite Title which you can move to the correct place and it will clear out the regular title so you don't get two titles. The default title field in the list is useless.

ccshannon’s picture

Whoops, just figured it out and withdraw the question.

For those trying to get a title to show up in a custom Display Mode, you MUST choose a Layout from the layout options in the accordion at the bottom of the Manage Display page. If you don't, the Extras options do not appear.

Thanks.

dave.erwin’s picture

That's one way to move the title, but then you lose the functionality to make title a link and provide a path on the edit form.
so the user sees the ability to add a link to the title, but it doesn't work. now that functionality needs to be removed from the form.
would rather be able to arrange the title position via manage display.

edit:
I used this as a workaround for now, added this to a module:

function modulename_preprocess_fieldable_panels_pane(&$vars) {
  $vars['title'] = '';
  if(!empty($vars['elements']['#fieldable_panels_pane']->title)) {
    $vars['title'] = $vars['elements']['#fieldable_panels_pane']->title;
  }
  if(!empty($vars['elements']['#fieldable_panels_pane']->path)) {
    $vars['path'] = $vars['elements']['#fieldable_panels_pane']->path;
  }
}

and this to ds-1col--fieldable-panels-pane-panename.tpl.php since I'm using a 1 column layout in DS
added right after the print $ds_content becacuse I wanted the title at the bottom.

<?php if(isset($path)): ?>
  <h2><a href="<?php print $path ?>"><?php print $title ?></a></h2>
<?php else: ?>
  <h2><?php print $title ?></h2>
<?php endif; ?>

it checks if a path is set for the title and if so prints the title wrapped in an a tag with $path for href
if path isn't set it just prints the title, if no title at all is set it just prints an empty h2 tag