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.