From .tpl to .php

Author Message

HÃ¥vard Bergersen

Monday 19 April 2010 1:44:37 am

Hey everyone.. Starting this monday off with a question I just can't seem to figure out:

I have made a module, that integrates with a external site, and fetches the a list of shows available at a theatre and generates a "buy tickets" button. The module works, both by accessing is directly by the url or in a template. I get the information needed, and everyone is happy... So far...

Now the problem is; at my site i would like to get the tickets available for just one of the shows (when entering mysite.com/shows/show-x/), and getting the option to buy it directly from that site too..
To be able to do this I would have to provide my script with a title id. How do i do that?
Is it possible to pass a value from a .tpl file to the module?

Steven E. Bailey

Monday 19 April 2010 2:23:06 am

I think what you want is either a view parameter or ordered/unordered parameter. Take a look at the ordered/unordered section here:

http://ez.no/doc/ez_publish/technical_manual/4_x/concepts_and_basics/modules_and_views

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 29 2025 14:45:04
Script start
Timing: Jan 29 2025 14:45:04
Module start 'layout'
Timing: Jan 29 2025 14:45:04
Module start 'content'
Timing: Jan 29 2025 14:45:04
Module end 'content'
Timing: Jan 29 2025 14:45:04
Script end

Main resources:

Total runtime0.0139 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.0078151.1953
Module start 'layout' 0.00550.0027 739.203136.6172
Module start 'content' 0.00820.0044 775.820390.0938
Module end 'content' 0.01260.0012 865.914129.9922
Script end 0.0138  895.9063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002115.1040140.0001
Check MTime0.00107.1201140.0001
Mysql Total
Database connection0.00096.481810.0009
Mysqli_queries0.003122.688730.0010
Looping result0.00000.086010.0000
Template Total0.00096.810.0009
Template load0.00075.339210.0007
Template processing0.00021.414410.0002
Override
Cache load0.00053.537710.0005
General
dbfile0.00117.849780.0001
String conversion0.00000.043040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs