I have a simple website. It must support:

  • self registration, verification and login of 4 different sorts of (non-administrative) users
  • a basic page layout consisting of two stacked divs, both centered, the top slightly narrower than the bottom
  • (multi-) file upload for logged in users
  • a page for image viewing (jquery/ajax image preloading)

The current display uses jquery: tabs for display and js/ajax for managing image preloading ....

From what I have read, drupal seems like a reasonable choice of CMS for a site with this sort of functionality. I am trying to figure out how to get my site in. Things are not going well.

I have begun by trying out the jquery module. I added and enabled it but even with trivial content in the tab body, I get an error and no output.

Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1573 of /usr/share/drupal7/includes/bootstrap.inc).

I'm thinking that I should reconsider my approach and would greatly appreciate any suggestions.

Comments

nevets’s picture

From

I have begun by trying out the jquery module. I added and enabled it but even with trivial content in the tab body, I get an error and no output.

I wonder what you are doing since jquery is part of core. Are you referring to the jquery update module?

And what does "trivial content in the tab body" refer to? Are you using a content type? How are you trying to add you jQuery code?

Len Berman’s picture

The module is field_jquery_tabs. I created a new content type with this field. When I tried to add content (the content was 'tab 1') I got the message included in my post when I hit preview. If there is a better way to get jquery tabs into drupal, I would like to know.

I am a total newbie with drupal and still trying to understand how to get any content into drupal. Also how to apply CSS?

nevets’s picture

If you are trying to place parts of node/code in tabs, I prefer the field group module which provides both vertical and horizontal tabs as well as other ways of grouping the content.

Len Berman’s picture

Field group looks great. I will check it out.

Len Berman’s picture

I think field group is perfect. My problem is I am a drupal newbie and I don't know how to use it. I understand what I want in HTML, but don't understand how to put it in drupal. In html, I want to say:

and have the content of the two referenced files show up in tabs labelled Organization and About respectively.

So far, in Drupal, I have created a content type with a horizontal tab group and two horizontal tab children but I can't figure out how to get content into the tabs.

I expected that when I created an item of the new content type, there would be a way to input content for the two children (cut and paste if nothing else), but this didn't happen and, once again, I'm confused.

Help greatly appreciated. Thanks.

nevets’s picture

On the manage display tab you will see the fields for your content type, you can drag a field under/indent below a field group that represent a tab. So you end up with something like

tab group (field group)
   tab1 (field group)
      field1
      field2
   tab2 (field group)
      field3
      field4

Note that not all fields need to be under a tab.

Len Berman’s picture

I think I am beginning to understand, but I am still confused about the difference between manage fields and manage display. On the manage display tab I am adding items that are html elements. Do I then define these items as fields as well?

Len Berman’s picture

I created a content type (Tabbed_Home) which contained a horizontal tabs group (group_5). It had two child horizontal tab items (group_5a and group_5p). I saved the content type but when I go to add content of that type, all I see is a place to enter HTML. Where to I add content for the tabs?

nevets’s picture

You add fields to a content type a Manage Fields, it also controls how they show on the add/edit form.

A Manage Display you manage what fields and how they are layed out.

When using field group you are adding organizing elements to the display, to actual display something you need to place one or more fields under the tab.