projects / org / ezproject2010 / paradoxpdf / forum / general / global variables lost?
Find the Exponential Software extensions you want
You need to be logged in to post messages in the forums. New users may register here.
Member since: Posts: 10 |
Monday 01 June 2009 11:11:46 am I have a number of variables set in node view full override and they are used in templates for custom ezxml tags (as global variables, $#var). It works fine in normal full view, but in pdf view these variables are not set in custom tag templates, although exact same templates are used. Also, $persistent_variable seems to lose value too. Do you have any ide what could be the problem? Im quite baffled..
Certified eZ developer looking for projects. |
|
Member since: Posts: 72 |
Monday 01 June 2009 11:39:21 am If you make your own override you will get all this global variables.
As you are the second person (http://projects.ez.no/paradoxpdf/...using_googlepath_javascript_problem) who asked for this : i have updated the node/view/pdf.tpl so you can get variables set by content view. It is on the trunk I will make a new release that includes this modification.
http://www.amiralweb.com Certified eZPublish Expert |
|
Member since: Posts: 10 |
Tuesday 02 June 2009 3:38:00 pm Thanks for your help! Did not work tho, global variables are still gone in tag templates.
Do i understand correctly, $module_result.content should return same thing to default ezwebin pagelayout and your pagelayout override? Because it does not. If i change the match rule in paradoxpdf override.ini to: Match[viewmode]=full then it will suddenly start to work. What i do, exactly: In my override for node view full folder i am setting {def $myvar='somestring'} Then, in design/ezwebin/templates/content/datatype/view/ezxmltag/mycustomtag.tpl (which gets called if this custom tag is used in ezxml field) i try to access it: {$#myvar} Works in full layout, doesnt in pdf layout. I am not sure if im misunderstanding some concept or if there is some bug at work here.. Certified eZ developer looking for projects. |
|
Member since: Posts: 72 |
Tuesday 02 June 2009 4:12:40 pm It's hard to figure out what happens. Anyway, the folowing could be helpful :
you dont have to make any change to the default paradoxpdf override.ini. You can instead override it with template override mechanism. When you call content/view/pdf/ <node_id> then the system loads the node/view/pdf.tpl and paradox_pdf_layout.tpl (for the layout) By default, paradoxpdf overrides the node/view/pdf.tpl and loads node/view/full.tpl, just to make it working out of the box. In most cases you will have to make a custom design for your pdf . So first you override the paradoxpdf_layout.tpl once. For example you can copy the default paradoxpdf_layout.tpl to a new file my_pdf_layout.tpl then in (for example) your siteaccess :override.ini.append.php
http://www.amiralweb.com Certified eZPublish Expert |
|
Member since: Posts: 10 |
Wednesday 03 June 2009 12:44:25 am I have also posted in developer forum
http://ez.no/developer/forum/deve...ut_kills_global_variables_in_content Hopefully can figure it out, thanks for help :) Certified eZ developer looking for projects. |
You need to be logged in to post messages in the forums. New users may register here.