DrupalBin
Submit Code
About
Recent Posts
Fix for Code
Code
Code
Fix for YesCT make an acronym
YesCT make an acronym
Code
block_menu
Node lookup
Fix for Video tag RegExp
Video tag RegExp
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
simpletest
test
theme
user
views
more tags
Home
›
this one-> contemplate cant display 'view' (just 'value') and cant display cck location fields
Fix for this one-> contemplate cant display 'view' (just 'value') and cant display cck location fields
View
Fix
Fixes are not saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Show summary in full view
<h2> <?php print $node->field_long_group_name[0]['view'] ?> </h2> <p> All mothers welcome to come to our meetings. Babies are always welcome at our meetings. <p> <?php print $node->field_intro[0]['view'] ?> <h2> Meeting Information </h2> <?php foreach ((array)$node->field_meeting as $meeting_item) { echo "<p>"; print $meeting_item['view']; echo "<- that is the meeting_item['view']"; $new_meeting_node = node_load($meeting_item['nid']); echo " "; print check_plain($new_meeting_node->field_day[0]['value']); echo " at "; //begin debug code print $new_meeting_node->body; echo " "; print $new_meeting_node->field_groupname[0]['nid']; echo " "; print $new_meeting_node->field_meetingplacelocation[0]['lid']; echo "<p>"; //the following does not print anything, even through the lid does above! print $new_meeting_node->field_meetingplacelocation[0]['view']; echo "<- there should be address info there"; foreach ((array)$new_meeting_node->field_meetingplacelocation as $meetingplacelocation_item) { echo "locations"; //nothing gets printed, not sure what code to write. print $meetingplacelocation_item[0]['lid']; print $meetingplacelocation_item[0]['name']; print $meetingplacelocation_item[0]['street']; print $meetingplacelocation_item['city']; print $meetingplacelocation_item['postalcode']; } //end debug code //also trouble... why does not ['view'] display? just ['value'] print check_plain($new_meeting_node->field_instructions[0]['value']); if( $new_meeting_node->field_confirm_with_call[0]['value'] ) { echo "<p> Please call a Leader to confirm the day, time and location."; } } ?> <h2> Leader Information </h2> <p> Leaders are experienced mothers. They are available by phone whenever you have breastfeeding questions or concerns. <ul> <?php foreach ((array)$node->field_leader as $leader_item) { echo "<li>"; print $leader_item['view']; echo " "; $new_leader_node = user_load($leader_item['uid']); foreach ((array)$new_leader_node->field_leaderdisplayname as $displayname_item) { print check_plain($displayname_item['value']); } echo " "; if (strcmp($new_leader_node->field_displaythephone[0]['view'],"all")) { echo "yes display the phone: "; foreach ((array)$new_leader_node->field_myphone as $myphone_item) { print check_plain($myphone_item['value']); } echo " "; } else { echo "dont display the phone. "; } if (strcmp($new_leader_node->field_displaytheemail[0]['view'],"all")) { echo "yes display the email: "; foreach ((array)$new_leader_node->field_email as $email_item) { print check_plain($email_item['email']); } } else { echo "dont display the email. "; } } ?> </ul> <center><blockquote> This Web page is maintained by for <?php print $node->field_long_group_name[0]['view'] ?> . Feedback welcome. </blockquote> </center>
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal 5
Drupal 6
HTML
INI
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.
See Also:
Order
Title:
URL:
-1
0
1
Title:
URL:
-1
0
1
Any links you'd like to have associated with the post (Drupal.org issue, Wikipedia article, etc).
File attachments
Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.
Attach new file:
The maximum upload size is
1 MB
. Only files with the following extensions may be uploaded:
jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp
.
Submit Fix
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Show summary in full view
<h2> <?php print $node->field_long_group_name[0]['view'] ?> </h2> <p> All mothers welcome to come to our meetings. Babies are always welcome at our meetings. <p> <?php print $node->field_intro[0]['view'] ?> <h2> Meeting Information </h2> <?php foreach ((array)$node->field_meeting as $meeting_item) { echo "<p>"; print $meeting_item['view']; echo "<- that is the meeting_item['view']"; $new_meeting_node = node_load($meeting_item['nid']); echo " "; print check_plain($new_meeting_node->field_day[0]['value']); echo " at "; //begin debug code print $new_meeting_node->body; echo " "; print $new_meeting_node->field_groupname[0]['nid']; echo " "; print $new_meeting_node->field_meetingplacelocation[0]['lid']; echo "<p>"; //the following does not print anything, even through the lid does above! print $new_meeting_node->field_meetingplacelocation[0]['view']; echo "<- there should be address info there"; foreach ((array)$new_meeting_node->field_meetingplacelocation as $meetingplacelocation_item) { echo "locations"; //nothing gets printed, not sure what code to write. print $meetingplacelocation_item[0]['lid']; print $meetingplacelocation_item[0]['name']; print $meetingplacelocation_item[0]['street']; print $meetingplacelocation_item['city']; print $meetingplacelocation_item['postalcode']; } //end debug code //also trouble... why does not ['view'] display? just ['value'] print check_plain($new_meeting_node->field_instructions[0]['value']); if( $new_meeting_node->field_confirm_with_call[0]['value'] ) { echo "<p> Please call a Leader to confirm the day, time and location."; } } ?> <h2> Leader Information </h2> <p> Leaders are experienced mothers. They are available by phone whenever you have breastfeeding questions or concerns. <ul> <?php foreach ((array)$node->field_leader as $leader_item) { echo "<li>"; print $leader_item['view']; echo " "; $new_leader_node = user_load($leader_item['uid']); foreach ((array)$new_leader_node->field_leaderdisplayname as $displayname_item) { print check_plain($displayname_item['value']); } echo " "; if (strcmp($new_leader_node->field_displaythephone[0]['view'],"all")) { echo "yes display the phone: "; foreach ((array)$new_leader_node->field_myphone as $myphone_item) { print check_plain($myphone_item['value']); } echo " "; } else { echo "dont display the phone. "; } if (strcmp($new_leader_node->field_displaytheemail[0]['view'],"all")) { echo "yes display the email: "; foreach ((array)$new_leader_node->field_email as $email_item) { print check_plain($email_item['email']); } } else { echo "dont display the email. "; } } ?> </ul> <center><blockquote> This Web page is maintained by for <?php print $node->field_long_group_name[0]['view'] ?> . Feedback welcome. </blockquote> </center>
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal 5
Drupal 6
HTML
INI
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.
See Also:
Order
Title:
URL:
-1
0
1
Title:
URL:
-1
0
1
Any links you'd like to have associated with the post (Drupal.org issue, Wikipedia article, etc).
File attachments
Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.
Attach new file:
The maximum upload size is
1 MB
. Only files with the following extensions may be uploaded:
jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp
.