Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I would like to setup a cck viewfield that points to a view. I would like to pass parameters to the view to create the moble code.
After I enable it, how do I create the mobile code for the node?
Comments
Comment #1
ice5nake CreditAttribution: ice5nake commentedI created a custom views template file for a path field I created in a view.
The template looks like this.
However I am trying to figure out how to control the size of the image. I hope there is a parameter for the theming function above that will allow for this.
Comment #2
IncrediblyKenzi CreditAttribution: IncrediblyKenzi commentedtheme('qr_codes', $output, 150, 150) should work for controlling the size.
Comment #3
windm CreditAttribution: windm commentedJust a quick question regarding this "qr-code in Views", hopefully not "off-topic"...:
When I got that right, you put that piece of code into a special view...tpl.php to get the QR-code for the path-field.
Seems to become difficult for my case, because I need to refer to create the QRcode for a path/node that is specified by it´s nid as the arg(2) of the view-URL.
For this reason I thought about "rewriting" the output of a (path) field with that kind of PHP Code, but the "rewrite the output of this field" seems to only accept some text or HTML.
Another solution for me would be to set up an "empty field" (in a way like using a GLOBAL:NULL Argument) and use that piece of code:
(arg(2) is the nid taken from the views arguments...)
Do you have any ideas or experience, how to get that QR Code - element into views as a "field"?
Edit: OK... the field-issue was quite easy... I use view_customfield right now with the "content"
Works fine for all Views (page, preview...) except for the "PDF Page" (created by view_pdf module) - the PDF should contain all fields incl. the customfield with the QR Code but does not display it.
Any idea from the QR-Code side of the "problem"?
Comment #4
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedwhy not use views_customfield?
it will return $data with items specified in the view. So if you need path just add it to the view
set up the view to return the node:path that you need.
you could use your print statement from above
Comment #5
windm CreditAttribution: windm commentedthanks SocialNicheGuru - the views_customfield was one part of the solution and the other part was in the views_pdf display settings... (still not satisfying, but I got the 1st QR on the pdf right now...).
So nothing more to investigate on the QR-Code side...
for me - solved and closed...
Comment #6
amirtaiar CreditAttribution: amirtaiar commentedThank you windm for the sulution in #3 which works fine for me. [#4 didnt worked for me well].
I am also need to to print this in using the views_pdf and I was wonder whether you have found the sulution.
Comment #7
amirtaiar CreditAttribution: amirtaiar commentedI just see that the QrCode lead to the homepage.... Not good for me.
I was trying to understand where and how should I use the code in #4?
Comment #8
amirtaiar CreditAttribution: amirtaiar commentedI am sorry - It was a pathauto issue - Even though it is strange...
Some node which url was node/[nid] (Before setting pathauto). so barcode wasn't lead to the node...