Unable to access column values in node

I am new to Drupal and developing my first Drupal site. So, this is probably a very basic question.

I used the Drupal 7 user interface and created a custom node type called 'groups'. In addition to the default fields (name and description), I added several custom fields. One new text field is called "manager". When I created the field via the user interface, the field name was automatically prepended with "field_", so the new field appears to have the name "field_manager". This is fine so far. Next, I created an instance for the new node type. So, now the node has some content.

Now, I am attempting to access this instance in a module. For reference, I used a sample from "Pro Drupal 7 Development" - see below,

$sql = 'SELECT nid FROM {node} n WHERE n.type = :type';
$result = db_query($sql, array(':type' => 'groups'));
$nids = array();
foreach ($result as $row) {
$nids[] = $row->nid;
echo $row->nid;
}

This worked great and displayed the node ID for my single instance.

Next, I added the following code to retrieve the "title" for the node instance,

$sql = 'SELECT title FROM {node} n WHERE n.type = :type';
$result = db_query($sql, array(':type' => 'groups'));
$titles = array();
foreach ($result as $row) {
$titles[] = $row->title;
echo $row->title;
}

Keeps pointing to the wrong IP address

I build a drupal 7 site on a VM on my main machine at work. I then uploaded the VM to my server. When the VM was on my local machine it had a different IP address than it does on the server. I can get to the main page by typing the IP, but as soon as I click a link it tries to use the old IP and fails. Is there something I need to change to make it resolve to the correct IP? I'm not using DNS currently, only doing this by IP.

Help...please....
Thanks

Positioning User Login textfields horizontally using Genesis starter theme

Hi,

I am trying to create the User Login fields to be horizontal as such:

Username |________________| Password |__________________|

I understand CSS to a degree but I am very new to web design, I have totally customized my site but am completely stuck how and where to change the code to create the above.

Please help!

Warm regards,

Aaron

Moving the User Login Button???

Hi,

I'm working on my website Drupal 7 theme when I notice the User login button was in a different position than in Drupal 6. How can I move the user login button to the top of "create new account" and "request new password" links?

This is on drupal 7:
http://i10.photobucket.com/albums/a147/crazyben21/Image003.png

Display your PARENT (Primary Links) and CHILD (Secondary Links) on Drupal 7 [D7] Bartik or SubBartik theme on header as dropdown

Display your PARENT (Primary Links) and CHILD (Secondary Links) on Drupal 7 [D7] Bartik or SubBartik theme on header as horizontal & Vertical drop-down menu.

After exploring D7’s functionality and structure and trying many but many different ways to set up my website’s www.lorenzoreynaga.com header with the MAIN MENU and its SUB_MENUS as Drop-Downs when hover the active menu link; I came up with this easy solution:
CREATE your custom MAIN MENUS (primary links) and corresponding CHILD MENUS (secondary links) for each Main Menu so that when active, secondary links are shown bellow.
Download and install NICE MENU Module from http://drupal.org/node/1042052

Got to Admin/structure/menus and click on [SETTINGS] tab at the top right corner and under the Source for the Main Links drop down box select [Main Menu] which by default will display your Primary links at the top of your page.

Can I add an entry to the menu_links table from template.php?

The title says it. I think the only way to add a page to drupal 7 that is not part of an internal path is to add an entry to menu_links. All the documentation talks about doing this from a module. Can I do it within template.php?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x