For such cases, an ETL like Talend Open Studio would be nice (I can eventually agree that for 4 lines, you doesn't need it, but for other cases like this, go big, go Talend ;)
The first colum in your panel needs an additional class alpha, and the last column an additional class omega. This removes the 10 pixel margins at the start and the end of the grid so it fits nicely.
I feel that the descibed case can be treated by using the hierarchical select module - that however has as a prerequisite that you would consider putting taxonomy terms in a hierarchy as in
"Sport Name"->"Team Name"
This would be a good drupal module. Something that will do the reverse of what the feeds module is doing. So instead of pulling content from other sites and populating into your site, this can push content to other sites. User should be able to map the fields to different form fields :-)
This is particularly helpful for people who maintain many sites. You can utilize the workflow and other features in drupal for managing content at the same time you could utilize the simplicity offered by other CMSs in displaying content.
I am getting below error while implementing above code
Warning: Invalid argument supplied for foreach() in menu_unserialize() (line 258 of url\includes\menu.inc).
I started off using drupal just about a year ago & ended up designing a website for my own institue.
Now am quite good at using D-6 & have built 3 more websites.
Love drupal & surely will use D-7 too.
Very awesome article here. I have my preprocess functions being accessed as they are supposed to be. But, what I'm trying to do is add a field to the fields template by adding to $variables['view']->result or $variables['view']['rendered_fields'][$key]['nc']. They seem to get added fine, but don't show up in my custom fields template in the $row variable.
Code is here:
function cpe_preprocess_views_view__course_subjects__page(&$variables) { // go through the results and get the information for each field. foreach($variables['view']->result AS $key => &$result) { $empty_count = db_result(db_query("SELECT COUNT(*) FROM {term_data} LEFT JOIN {term_node} ON {term_data}.tid = {term_node}.tid INNER JOIN {node} ON {term_node}.vid = {node}.vid LEFT JOIN {content_field_credits} ON {node}.vid = {content_field_credits}.vid WHERE content_field_credits.field_credits_value <> 0 AND {term_node}.tid = $result->tid")); $result->nc = ($empty_count == 0); $variables['view']['rendered_fields'][$key]['nc'] = ($empty_count == 0); } }
Ahhh , i feel your pain. That would be a quest i would like to undertake too .You think , "Oh, i can theme that node or view -- just copy x.tpl.php and put your own markup around the variables." Only to find there is one variable - $content.
Drupal seems to like you to theme each individual variable one at a time , rather than a whole page of variables all at the same time. Just look at the views templates -- you have one for the whole view, one for the table or display type, one for all the fields and one for each individual field. It's not real easy to track . Its more of a bottom up process rather than top down.
Coming from an mvc framework background where I would create my $variables and pass them to the template page and that template page would include other sub templates and pass them the $variables for each section of the page. It was much easier to trace the code just by looking at a template. But there wasn't the magic and modular features of drupal.
This article has been so helpful. Well written to explain and provide the much needed example :) Now i'm at a point where i have to decide to use drupal or an mvc framework for a rewrite of a customized curriculum management system. IMO a curriculum management system is almost all CMS. I mean the the acronymns are even the same. Thanks for this article filled a critical gap in my theming ability.
This is a wonderful article and I am really enjoying Drupal 7 with localization. Running into a problem though and hoping you can help: http://drupal.org/node/1144000
I am using the following modules on a fresh Drupal 7 installation:
Yes, I am using the features module for basic use of enabling the features of certain content types with their views ready with all the settings. I feel when you are working on drupal and making websites day in and day out on drupal, then there are a few things you would like to get done easily on sites. Features helps you with this. We have things like blog, forum, community wall etc which are all features based
If one site require it, put the module, enable it and you are ready and client is happy :P
It's absolutely true, there are good bits of information about theming, but they are all over the place. I even bought the Pro Drupal Development book and still didn't understand it. Your post got my brain to understand it finally, thanks!
For such cases, an ETL like Talend Open Studio would be nice (I can eventually agree that for 4 lines, you doesn't need it, but for other cases like this, go big, go Talend ;)
The first colum in your panel needs an additional class alpha, and the last column an additional class omega. This removes the 10 pixel margins at the start and the end of the grid so it fits nicely.
I'm doing something like the following in drupal 7
db_query('SELECT value FROM {profile_values} WHERE fid = %d AND uid = %d', $profile_field, $uid);But i get the error:
Recoverable fatal error: Argument 2 passed to db_query() must be an array, string given.
Can someone point me out to what i'm doing wrong.
I've used HS -- AFAIK it can't limit the hierarchy widget it controls by the values in *another field widget* which is what I am suggesting here.
And I would still want to same sport name and team name as two separate fields, because that makes for a clean IA.
I feel that the descibed case can be treated by using the hierarchical select module - that however has as a prerequisite that you would consider putting taxonomy terms in a hierarchy as in
"Sport Name"->"Team Name"
This would be a good drupal module. Something that will do the reverse of what the feeds module is doing. So instead of pulling content from other sites and populating into your site, this can push content to other sites. User should be able to map the fields to different form fields :-)
This is particularly helpful for people who maintain many sites. You can utilize the workflow and other features in drupal for managing content at the same time you could utilize the simplicity offered by other CMSs in displaying content.
I am getting below error while implementing above code
Warning: Invalid argument supplied for foreach() in menu_unserialize() (line 258 of url\includes\menu.inc).
I started off using drupal just about a year ago & ended up designing a website for my own institue.
Now am quite good at using D-6 & have built 3 more websites.
Love drupal & surely will use D-7 too.
Thanx for all the links to upgraded features.
http://drupal.org/sandbox/Fabianx/1184598
Whilst I've not needed to do exactly what you describe to date, I am sure this'll be just the information I need at some point in the future!
Chris
Thanks, this was very helpful in theming views.
Very awesome article here. I have my preprocess functions being accessed as they are supposed to be. But, what I'm trying to do is add a field to the fields template by adding to $variables['view']->result or $variables['view']['rendered_fields'][$key]['nc']. They seem to get added fine, but don't show up in my custom fields template in the $row variable.
Code is here:
function cpe_preprocess_views_view__course_subjects__page(&$variables) {// go through the results and get the information for each field.
foreach($variables['view']->result AS $key => &$result) {
$empty_count = db_result(db_query("SELECT COUNT(*)
FROM {term_data}
LEFT JOIN {term_node} ON {term_data}.tid = {term_node}.tid
INNER JOIN {node} ON {term_node}.vid = {node}.vid
LEFT JOIN {content_field_credits} ON {node}.vid = {content_field_credits}.vid
WHERE content_field_credits.field_credits_value <> 0 AND {term_node}.tid = $result->tid"));
$result->nc = ($empty_count == 0);
$variables['view']['rendered_fields'][$key]['nc'] = ($empty_count == 0);
}
}
thanks for any help.
Swan, did you ever solve your problem? I am having the same issue, and I have been unable to solve it.
keep up the good work..
Ahhh , i feel your pain. That would be a quest i would like to undertake too .You think , "Oh, i can theme that node or view -- just copy x.tpl.php and put your own markup around the variables." Only to find there is one variable - $content.
Drupal seems to like you to theme each individual variable one at a time , rather than a whole page of variables all at the same time. Just look at the views templates -- you have one for the whole view, one for the table or display type, one for all the fields and one for each individual field. It's not real easy to track . Its more of a bottom up process rather than top down.
Coming from an mvc framework background where I would create my $variables and pass them to the template page and that template page would include other sub templates and pass them the $variables for each section of the page. It was much easier to trace the code just by looking at a template. But there wasn't the magic and modular features of drupal.
This article has been so helpful. Well written to explain and provide the much needed example :) Now i'm at a point where i have to decide to use drupal or an mvc framework for a rewrite of a customized curriculum management system. IMO a curriculum management system is almost all CMS. I mean the the acronymns are even the same. Thanks for this article filled a critical gap in my theming ability.
Can we use this function to overwrite the hook_menu?
I try it but i cant figure out how to push my data to a panel directly from a module.
Thanks for such a good post! I have a question though:
When I run ssh-keygen -t dsa, it says that does not exist. What should I do now.
i'll try use this for ubuntu )
what would be the best approach for using db_delete with multiple conditions such as an 'AND' clause?
for instance:
<?php//drupal 6 style delete
db_query("DELETE FROM {table} WHERE col1='%s' AND col2='%s' ", $val, $val2);
?>
Would that translate to this?
<?php//d7 style?
$del = db_delete('table')
->condition('col1', $val)
->condition('col2', $val2)
->execute();
?>
This is a wonderful article and I am really enjoying Drupal 7 with localization. Running into a problem though and hoping you can help: http://drupal.org/node/1144000
I am using the following modules on a fresh Drupal 7 installation:
advanced_help, calendar, captcha, colorbox, ctools, date, ds, elements, entity, features, globalredirect, image_resize_filter, insert, l10n_client, l10n_update, panels, pathauto, pathologic, po_re_importer, profile2, rules, terms_of_use, token, transliteration, views, webform and wysiwyg
Yes, I am using the features module for basic use of enabling the features of certain content types with their views ready with all the settings. I feel when you are working on drupal and making websites day in and day out on drupal, then there are a few things you would like to get done easily on sites. Features helps you with this. We have things like blog, forum, community wall etc which are all features based
If one site require it, put the module, enable it and you are ready and client is happy :P
Hey was looking for a nice and complete make file for drupal make
Your's made it clear.
Thanks man
Drupal rocks \m/
First time i tried it it got installed in my home folder, because that's where you start out as shell. cd to the correct folder and then try again...
You can add contacts to your auto completion by 'right-clicking' them and 'Add to Address Book...'.
Then the auto-completion will work with these too. Cheers.
It's absolutely true, there are good bits of information about theming, but they are all over the place. I even bought the Pro Drupal Development book and still didn't understand it. Your post got my brain to understand it finally, thanks!