PDF filename extension in URL

Author Message

Elena Ivanova

Monday 31 March 2008 1:45:29 am

Hello,

Automatically generated PDF files using built-in PDF export have URLs like: .../content/pdf/node_id.

Is it possible to have .pdf extension in this URL, i.e. .../content/pdf/node_id.pdf or even better .../content/pdf/node_name.pdf

Many thanks for your help,
Elena

Bartek Modzelewski

Monday 31 March 2008 7:14:40 am

Hello Elena,

There is absolutly no problem with having <i>.pdf</i> in URL, just modify link in your temptate into:

{concat('/content/pdf/',$node.node_id,'.pdf')|ezurl}

content/PDF module will have no problem with that, will give you PDF as it should :)

Cheers
Bartek

Baobaz
http://www.baobaz.com

Elena Ivanova

Monday 31 March 2008 11:03:02 pm

Hello Bartek,

Many thanks for your help. The solution was realy straightforward.

Do you know if it's possible to have node.name instead of node_id as filename in generated PDF? I tried with concat('/content/pdf/',$node.name), but it doesn't work?

Regards,
Elena

Ekkehard Dörre

Monday 07 April 2008 5:58:31 am

Hi Elena,

you'll need the urlalias:

http://now.ezpublish.no/eng/content/pdf/Company/News/Lyon-attracts-world-leaders

Greetings ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

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 31 2025 03:43:03
Script start
Timing: Jan 31 2025 03:43:03
Module start 'layout'
Timing: Jan 31 2025 03:43:03
Module start 'content'
Timing: Jan 31 2025 03:43:04
Module end 'content'
Timing: Jan 31 2025 03:43:04
Script end

Main resources:

Total runtime1.2939 sec
Peak memory usage8,192.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.1328151.2109
Module start 'layout' 0.00590.0045 739.3438220.6875
Module start 'content' 0.01041.2826 960.03134,498.1484
Module end 'content' 1.29300.0008 5,458.179711.8516
Script end 1.2938  5,470.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2728160.0002
Check MTime0.00140.1089160.0001
Mysql Total
Database connection0.00080.064310.0008
Mysqli_queries1.200392.7708620.0194
Looping result0.00050.0422600.0000
Template Total1.234895.420.6174
Template load0.00210.160320.0010
Template processing1.232895.278120.6164
Template load and register function0.00120.095610.0012
states
state_id_array0.00200.155410.0020
state_identifier_array0.00300.233520.0015
Override
Cache load0.00170.1335290.0001
Sytem overhead
Fetch class attribute can translate value0.00200.152230.0007
Fetch class attribute name0.00200.153860.0003
XML
Image XML parsing0.00330.258130.0011
class_abstraction
Instantiating content class attribute0.00000.001070.0000
General
dbfile0.00380.2972220.0002
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs