eznode link rendering

Author Message

Vjeran Vlahovic

Wednesday 01 February 2006 3:26:25 am

Hi all,

Is there a way to adjust eznode protocol (eznode://[id] )? I want that hrefs generated this way have no "index.php" part.

Example:

Let's say we have <link href="eznode://999">Nice cat</link>

I want that above code generates href="/siteaccess/nice_cat", not href="/index.php/siteaccess/nice_cat"

Is that possible?
Thanks

http://www.netgen.hr/eng

Børge Warvik

Thursday 02 February 2006 2:21:18 am

I believe you have to use the .htaccess file and write a rewrite_rule.

Vjeran Vlahovic

Thursday 02 February 2006 4:07:36 am

Thanks Borge for your reply.

Yes, I have rewrite rule which assures that links without index.php work properly. But now I want ez to generate links without index.php suffix. Modifying templates (menus, links to content views, etc.) is an easy task - i just use ezroot operator instead of ezurl. But links to content that are generated through eznode protocol in ezxml datatype are handled somewhere deeply. Anyone who has a clue where?

http://www.netgen.hr/eng

Ciprian Popovici

Tuesday 09 May 2006 7:45:21 am

Override content/datatype/view/ezxmltags/link.tpl, ask for a copy of the original (not a blank file), then edit that template and bingo, you can customize all links inside XML blocks.

What you want is done by changing ezurl with ezroot, but you can think of more advanced uses, such as explicitly marking external links (that lead off-site).

Here's mine:

<a href={if eq($href|extract_left(1),'#')}{$href|ezurl}{else}"{$href|ezroot(no)}/"{/if}{section show=$id} id="{$id}"{/section}{section show=$title} title="{$title}"{/section}{section show=$target} target="{$target}"{/section}{section show=ne($classification|trim,'')} class="{$classification|wash}"{/section}>{$content}</a>

Also search the forums and docs for PathPrefix, it's worth it.

André R.

Tuesday 09 May 2006 1:51:02 pm

This can be done without modifing the template files.
Search for virtualhost mode on this forum for more info.

Among one of the things that could work is:

[SiteAccessSettings]
ForceVirtualHost=true

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 18 2025 11:36:45
Script start
Timing: Jan 18 2025 11:36:45
Module start 'layout'
Timing: Jan 18 2025 11:36:45
Module start 'content'
Timing: Jan 18 2025 11:36:45
Module end 'content'
Timing: Jan 18 2025 11:36:45
Script end

Main resources:

Total runtime0.0178 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.0069 587.9063152.6250
Module start 'layout' 0.00690.0034 740.531339.4453
Module start 'content' 0.01020.0050 779.976693.4297
Module end 'content' 0.01520.0026 873.406338.3047
Script end 0.0178  911.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002715.1707140.0002
Check MTime0.00126.4983140.0001
Mysql Total
Database connection0.00074.102110.0007
Mysqli_queries0.003620.127630.0012
Looping result0.00000.091010.0000
Template Total0.002212.310.0022
Template load0.00137.301010.0013
Template processing0.00094.926210.0009
Override
Cache load0.00063.439810.0006
General
dbfile0.00031.586880.0000
String conversion0.00000.056240.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