HI!
I have been successful in installing basic and advanced ddblock. Then I followed instructions at http://ddblock.myalbums.biz/node/851 in order to link button to a page of my choosing instead of to its node.
Link field is shown correctly in view, but it is not being used in preprocess function.
Example view:
Title: featured 1
Pager item (button) text: No 1 Button
Url: node/331
Slide text:
featured one slide text
Image Field:
Body:
fg sdg fds gfds gf gsfd
Title: featured 2
Pager item (button) text: No 2 Button
Url: put_u_ropstvo
Slide text:
dfs sd df sfdgsfd g
Image Field:
Body: xyz
In view the variable machine name is shown as node_data_field_pager_item_text_field_url_value but it does not appear in the list of variables when enabling debug lines in template.php. All other variables used in the news item advanced block do appear however.
I tried deleting all content from news items, and creating new ones with page links. Cleared cache, ran cron, but to no avail.
Any ideas? Thanks in advance!
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | view_export.txt | 8.66 KB | yadranko |
Comments
Comment #1
yadranko commentedI played with it some more, but still no success. Whatever new variable I add to the content type, it won't show in the debug, which is why I believe it doesn't get used by the preprocess function.
this is the debug output:
#
views_items
#
*
... (Object) stdClass
o
node_title (String, 10 characters ) featured 1
o
node_data_field_pager_item_text_field_pager_item_text_value (String, 11 characters ) No 1 Button
o
node_type (String, 17 characters ) ddblock_news_item
o
nid (String, 3 characters ) 353
o
node_vid (String, 3 characters ) 354
o
node_data_field_pager_item_text_field_slide_text_value (String, 29 characters ) featured one slide text
o
node_data_field_slider_image_field_slider_image_fid (String, 3 characters ) 290
o
node_data_field_slider_image_field_slider_image_list (String, 1 characters ) 0
o
node_data_field_slider_image_field_slider_image_data (String, 309 characters ) a:13:{s:11:"description";s:0:"";s:3:"fid";s:3:"...
+
a:13:{s:11:"description";s:0:"";s:3:"fid";s:3:"290";s:5:"width";i:288;s:6:"height";i:288;s:8:"duration";i:0;s:12:"audio_format";s:0:"";s:17:"audio_sample_rate";i:0;s:18:"audio_channel_mode";s:0:"";s:13:"audio_bitrate";i:0;s:18:"audio_bitrate_mode";s:0:"";s:4:"tags";a:0:{}s:3:"alt";s:0:"";s:5:"title";s:0:"";}
o
node_revisions_body (String, 14 characters ) body yyy
o
node_revisions_format (String, 1 characters ) 2
o
node_created (String, 10 characters ) 1289834808
However each new variable does show up in the preview of the View:
Title: featured 2
Pager item (button) text: No 2 Button
Url: put_u_ropstvo
Slide text:
dfs sd df sfdgsfd g
Image Field:
Body:
body text in here xx
TestUrl: node/332
The query:
SELECT node.title AS node_title,
node_data_field_pager_item_text.field_pager_item_text_value AS node_data_field_pager_item_text_field_pager_item_text_value,
node.type AS node_type,
node.nid AS nid,
node.vid AS node_vid,
node_data_field_pager_item_text.field_url_value AS node_data_field_pager_item_text_field_url_value,
node_data_field_pager_item_text.field_slide_text_value AS node_data_field_pager_item_text_field_slide_text_value,
node_data_field_image.field_image_fid AS node_data_field_image_field_image_fid,
node_data_field_image.field_image_list AS node_data_field_image_field_image_list,
node_data_field_image.field_image_data AS node_data_field_image_field_image_data,
node_revisions.body AS node_revisions_body,
node_revisions.format AS node_revisions_format,
node_data_field_pager_item_text.field_test_url_value AS node_data_field_pager_item_text_field_test_url_value,
node.created AS node_created
FROM node node
LEFT JOIN content_type_ddblock_news_item node_data_field_pager_item_text ON node.vid = node_data_field_pager_item_text.vid
LEFT JOIN content_field_image node_data_field_image ON node.vid = node_data_field_image.vid
LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
WHERE (node.status <> 0) AND (node.type in ('ddblock_news_item'))
ORDER BY node_created ASC
I'm completely puzzled!
Comment #2
ppblaauw commentedDo you maybe have the content permissions module enabled (submodule of CCK) and there are no permissions yet for the new fields?
Comment #3
yadranko commentedThanks for the help!
The content_permissions module is enabled and all the fields within it are enabled for viewing to all users, including the 'field_url'
Should I try deactivating the content_permissions module?
Could it have anything to do with the fact that this field was added manually to the view and not imported as was the case with the original view? Attached is the export text file of the view.
Comment #4
ppblaauw commentedStrange it is not showing up in the preprocess function, while it is showing up in the sql statement of the view.
Is your link field added to the block display (News item slideshow) of the view for the slideshow or only to the default display?
Comment #5
yadranko commentedThe url field is present in both displays. Running a preview shows results in both locations. I have run cron and clear cache many times, even tried not using cache at all, but no success. Because the variable is not recognized, I always get the else if part in the preprocess function executed and my read more... link points to the node. My theme is marinelli.