Closed (fixed)
Project:
Dynamic display block
Version:
6.x-1.0-rc6
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Jun 2009 at 07:38 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ppblaauw commentedYes, this is possible.
You can read how in the: How to link Read more... button to another page instead of the node
Hope this helps you further, please let me know.
Please don't assign issues to yourself if you don't solve the issue.
If you assign an issue to yourself, it means YOU will solve the issue, nobody has to do something.
I don't think this is what you mean.
Comment #2
Anandyrh commentedThanks, But i wanted to link the whole slide to a node?
Comment #3
faraj1978 commentedI do that by disabling the Read more link in the file ddblock-cycle-block-content-upright(Nr.).tpl.php
-------------------------------- So i hope this will help you ----------------------------
Note. if you are using NEXT Option in the DDBLOCK Settings, this read more link will not work Correctly.
Comment #4
ppblaauw commentedThe steps are almost the same, only the changes in the preprocess functions are different.
You have to make a link for the image part.
Add the link function l() to the image part.
EDIT, SEE #6 (THIS CODE IS WRONG)
change
to
and
to this
Hope this helps you further, please let me know.
Comment #5
Anandyrh commentedI dont't see these functions in my Preprocess function.
Comment #6
ppblaauw commentedSorry, I used code from a new theme file
EDIT, SEE #10 (THIS CODE IS WRONG)
You should change:
to
Comment #7
Anandyrh commentedNO........!
1) i added text filed to node type
2) added the url to the slide node
3) called the url text field in news item view
4) changed the above given code in template.php file
After doing all this the result was:
1) I could not see backgroung image for the slide show (in all five slides)
2) I can see image source in place of image
Eg:
<img src="/siteroot/sites/default/files/test.jpg" alt="Test Image"/>Please help me out to fix this issue...
Regards,
AnAnD
Comment #8
Anandyrh commentedHi, ppblaauw
Please help me out...
Thanks & Regards,
AnAnD
Comment #9
Anandyrh commentedHi faraj,
Thanks i have all ready removed the read more button form the code...
I am on a process to link slide to an custom node... Instead of Read more...Button.
Regards,
AnAnD
Comment #10
ppblaauw commentedOk, I tested the link on my site, and notice I made a mistake.
The l() function uses the plain_text() function to convert the linktext to plain text.
This means that html characters like < are converted to < and you will not see the image anymore but only the html code.
You need to change the code to
Hope this helps you further, please let me know.
Comment #11
Anandyrh commented:-)
Hi ppblaauw,
I too got to know the error when i saw the sorce of the slide show and the i managed to do the same like you have done the 'l' function was creating the problem.
But new problem has occored, Now click is working only on the image... If i click on the Title or Slide text the link is not working... So now how do i make whole slide as clickable?
Comment #12
Anandyrh commentedFor now i have linked the node_title and slide_text the same way how i linked the background image and have set display:block; in the css file for the styles, It works fine with IE the whole slide is clickable i was happy about it...
But when i checked the same in FireFox just the background image, title and slide text is linked, the whole slide is not clickable, i think diplay:block is not working in firefox.
Thanks & Regards,
AnAnD
Comment #13
ppblaauw commentedCan you send a link to the Internet Site?
Can you attach your template.php file
There is a similar issue asking to link the title and image to the node (see Make the title and image link to the node.
Comment #14
Anandyrh commentedHi, i managed to link the whole slide now, It works fine with IE6, IE7, IE8 and FireFox.
sure i'll replay to this with link when i go live with my site...
1) Add url field to your content type:
see this link: http://ddblock.myalbums.biz/node/851
2) This the code i have used in template.php to link my background image:
3) Replace the below code in you template.php to link the node_title part.
<< To >>
4) And you have to add
display:blockin to yourdiv.ddblock-cycle-upright30 div.slide-titleStyle in ddblock-css-template.css fileThis should do the job for you...
Regards,
AnAnD
Comment #15
ppblaauw commentedGreat it works now for you and thanks for the writeup!
Some remarks about your solution:
2)
If you would use image cache for the slide image there would be no link.
See the code in #10
2,3)
If you would allow others to add URLs it's prefered to use the check_url function to avoid misuse.
See the code in #10
If you allow other to add nodes you could also use check_plain() function for the $result->node_title to avoid misuse.
check_plain($result->node_title)
I set the issue to fixed
Added tags
Comment #16
Anandyrh commentedThanks, ppblaauw
:-) Job is done for this module.
Regards,
AnAnD
Comment #18
physiotek commentedhi,
i have some problems having this to work.
i followed eactly what is instructed here
my image is linking but not to my custom node. it is always linking to
<front>.i guess the problem is here: node_data_field_slide_text_field_url_value
is it possible it have changed since older releases?
i tried also:
node_data_field_url_field_url_value
node_data_field_pager_item_text_field_url_value
any thoughts?
thanks
Comment #19
ppblaauw commented#18
Can you attach your template.php file and the result of the drupal_set_message lines when you uncomment them in both preprocess functions for the ddblock module in the template.php file of your theme.
A link to your Internet site would also be helpful
Comment #20
physiotek commentedwow! thanks for the VERY fast answer.
here we go:
website: http://www.physiotek.com/node/19
N.B. just realised the link is not
<front>but the actual page. sorry for that mistake. i was testing the module from<front>...thanks again for your help.
Comment #21
ppblaauw commentedThanks for sending the additional information.
I don't see a field in the debug lines which can be used as a URL.
Did you add an additional URL field to your content type?
Did you add an additional URL field to the views block you use?
Did you give permissions for the field when you use additional permissions modules?
Comment #22
physiotek commentedSo....
Did you add an additional URL field to your content type? YES
Did you add an additional URL field to the views block you use? YES
Did you give permissions for the field when you use additional permissions modules? I don'T have additional permissions modules
I don't see a field in the debug lines which can be used as a URL. I know. That's why i said that the node_data_field_slide_text_field_url_value command might be in trouble.
BTW i did a mistake when originaly entered the additional URL field in the content type. I wrote ULR instead of URL but i immediatly deleted it and recreated the field with the right typo. Dunno if that might be the cause of the troubles. I guess not. I looked at the database and couldnt see anything wrong. And for extra precautions, i did flush my cache.
Any thoughts?
Comment #23
ppblaauw commentedDo you see the URL field in the views SQL statement in the preview for the block in the news_items view?
Can you attach the sql statement?
Comment #24
ppblaauw commentedI see at your Internet site that the debug lines now contain the field:
So the code to add the readmore button would become:
You could add an else statement if not all slides have a URL value
What did you do to make the field appear now? Maybe useful for other users.
Comment #25
physiotek commentedhi ppblaauw,
everything is working now.
i simply did one mistake when following the steps... and a stupid one... forgot to save my view... argh!
anyway here'S my template.php code finally:
for the slide link if there is a link. otherwise no
<a>for the read more link if there is a link. otherwise, no read more button
thanks again for your work and your help!
Comment #26
ppblaauw commentedThanks for the explaining post
set status to fixed