Forums / General / Redirection

Redirection

Author Message

John Smith

Friday 31 October 2008 1:40:09 am

Hi there,

Need help in achieving the following requirement in ezpublish 4.0.0

Folder 1
|-> Sub Folder 1
|-> Sub Folder 2
Folder2
|-> Sub Folder 3

When user clicks Folder 1, the system takes the user to Sub Folder1....I know there is one extension named as "redirect" along with some template code it is easy to achieve what I am looking for, but I think as a eZpublish professional license holder I can't use that extension.....

There must be some another easy way to achieve.. What about Url translator? I tried but without any look.

Please help...

Cheers.

Gaetano Giunta

Friday 31 October 2008 7:13:06 am

I do not know about specific requirements about the redirection: does it have to be done externally (eg http 301 or 302) or internally? Is it ok to keep the "Folder1" url displayed?

You could achieve this sub-display in many ways using templates:

A - use a template for folder 1 that does an html-redirect to subfolder1

B - add a view parameter to the url used for folder1:
.../folder1/(display)/SubFolder1
then in the template for folder 1 you check if node child SubFolder1 exists, and if it does, you do a {node_view_gui} on it

Principal Consultant International Business
Member of the Community Project Board

John Smith

Friday 31 October 2008 3:27:21 pm

Hi Giunta,

Thank for your kind help. I am quite interested in option B, where you suggested to add a view parameter to the url used for folder1...

Can you please describe in bit more detail..

Thanks once again, Much appreciated....

John Smith

Saturday 01 November 2008 3:34:12 am

Template code is working fine as suggested by you, means when I click Folder1, it is going to SubFolder1 but in the menu SubFolder1 is not getting selected.

I have not added any view parameter anywhere. Dont know how to make the SubFolder1 selected in the menu. Can you please explain bit more about adding a view parameter to the url for folder1. Is it going in the template generating the menu?

Cheers,

John Smith

Saturday 01 November 2008 4:52:56 am

Got a solution on the following url, all sorted.. neat and clean solution.

http://ez.no/developer/forum/setup_design/direct_link_to_another_node_in_menu/re_direct_link_to_another_node_in_menu__1

Holger Marx

Monday 29 December 2008 8:43:15 am

Another possibility is to use .htaccess file for redirecting.

eZ debug

Timing: Jan 18 2025 15:17:06
Script start
Timing: Jan 18 2025 15:17:06
Module start 'content'
Timing: Jan 18 2025 15:17:06
Module end 'content'
Timing: Jan 18 2025 15:17:07
Script end

Main resources:

Total runtime0.2657 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.5313180.8594
Module start 'content' 0.00580.0059 768.390697.7813
Module end 'content' 0.01170.2540 866.1719526.7109
Script end 0.2657  1,392.8828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00361.3730200.0002
Check MTime0.00160.5969200.0001
Mysql Total
Database connection0.00080.295810.0008
Mysqli_queries0.217681.86971410.0015
Looping result0.00160.60521390.0000
Template Total0.253895.510.2538
Template load0.00090.344010.0009
Template processing0.252895.140210.2528
Override
Cache load0.00060.236010.0006
Sytem overhead
Fetch class attribute can translate value0.00080.296210.0008
XML
Image XML parsing0.00030.100510.0003
General
dbfile0.00331.2357200.0002
String conversion0.00000.001530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

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

Time used to render debug report: 0.0002 secs