Module views: Parameters to root view?

Author Message

Jerry Jalava

Saturday 20 December 2003 8:54:08 am

Hi,

Is it possible to assign parameters to modules "root" view?
I have a module "redirect" and I need to give it an parameter like this: redirect/article_1212.shtml...

I can get it to work like this "redirect/r/article_...", but I cannot use it like that...

I have tried to give in module.php the parameter option to view '' (null), but it doesn't accept them, it gives an module error that view not found.

Hopefully someone could help a bit...

Regards,
Jerry

Paul Forsyth

Saturday 20 December 2003 8:59:25 am

I don't think you can redirect like this. Redirection needs a module, view, and whatever parameters you have.

But have you consider some fancy url translations to mask the real uri?

paul

Jerry Jalava

Saturday 20 December 2003 11:16:54 am

Hi Paul,

Thanks for your reply...
I have indeed tried to think lot of ways to archieve this...

The deal is that our old website's articles were in style "domain.com/articles/article_1111.shtml" and now that we changed to eZ, we still would like search engines to find the articles with the same url, so we need a redirect script...

I have created module "article" and it parses the url and takes only the id from it and finds an ezarticle which have the same id in it's class attributes...

Is it possible to make an redirect with the URL Manager so everything that comes to module "article" goes to "article/redirect/"?

Regards,
Jerry

Bruce Morrison

Monday 22 December 2003 2:30:30 pm

Hi Jerry

The apache rewrite engine is ideal for this type of thing and because it is at the webserver level it is quick.

Cheers
Bruce
http://www.designit.com.au

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

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 01:17:05
Script start
Timing: Jan 31 2025 01:17:05
Module start 'layout'
Timing: Jan 31 2025 01:17:05
Module start 'content'
Timing: Jan 31 2025 01:17:05
Module end 'content'
Timing: Jan 31 2025 01:17:05
Script end

Main resources:

Total runtime0.0249 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.1563151.2109
Module start 'layout' 0.00520.0043 739.3672220.6875
Module start 'content' 0.00950.0136 960.0547997.8047
Module end 'content' 0.02310.0017 1,957.859433.9922
Script end 0.0248  1,991.8516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002911.6351140.0002
Check MTime0.00135.0731140.0001
Mysql Total
Database connection0.00093.541010.0009
Mysqli_queries0.00249.488130.0008
Looping result0.00000.048010.0000
Template Total0.00124.910.0012
Template load0.00093.818310.0009
Template processing0.00031.062010.0003
Override
Cache load0.00072.671810.0007
General
dbfile0.00124.709580.0001
String conversion0.00000.027840.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