Forums / Setup & design / what should be written in Match[url_alias] : alias of node or alias of parent node

what should be written in Match[url_alias] : alias of node or alias of parent node

Author Message

Vytautas Germanavičius

Monday 04 April 2005 8:01:17 am

i have folder "news" and some folders with articles inside. And i want to display articles in different style from section.
Everybody tels me in forum to use "url_alias". But nobody can tel me how: What i should write in overrides.ini

[Line_view_article]
...
Match[url_alias]=ALIAS_OF_FOLDER_news
or
Match[url_alias]=ALIAS_OF_EVERY_ARTICLE

{set-block scope=root variable=cache_ttl}0{/set-block}

Bård Farstad

Monday 11 April 2005 5:58:36 am

To get articles displayed differently in two, or more, folders in eZ publish you need to use some kind of override like you are saying.

The first option is to use a section override. This means that you need to assign a unique section to both folders and then create an override for that based on the section id.

The example below shows a section override for a folder for section 42. The folder needs to have a section with the id 42 assigned to make this work.

[news_folder]
Source=node/view/full.tpl
MatchFile=full/news_folder.tpl
Subdir=templates
Match[class_identifier]=folder
Match[section]=42

See example below for an override of the folder template based on the subtree products/hardware.

[folder_override]
Source=node/view/full.tpl
MatchFile=full/hardware_folder.tpl
Subdir=templates
Match[class_identifier]=folder
Match[url_alias]=products/hardware

--bård

Documentation: http://ez.no/doc

Vytautas Germanavičius

Monday 11 April 2005 8:59:16 am

:( My question was about how to display article in different style.

i have such situation (simplified):

news (section0)
|____Folder1 (section1)
|    |____Article1 (section1)
|____Folder2 (section2)
    |____Article2 (section2)
Hardware (section1)
|____Folder1(section1)
    |____Article1(section1)
    |____Article11(section1)
Software (section2)
|____Folder2(section2)
    |____Article2(section2)
    |____Article22(section2)

section0 must have red backgroud
section1 must have green backgroud
section2 must have blue backgroud

Articles to section0 are added using "add new location". and are dicplayed using style from original location.
Geeks from forum adviced to use "Match[url_alias]=". i tried to follow instruction from documentation, but nothing works...
I works, only if i specify exact url to article, but this has no sense ...

{set-block scope=root variable=cache_ttl}0{/set-block}

laurent le cadet

Monday 11 April 2005 9:34:44 am

Hi,

If it's just a question of colors, it seems to be a stylesheet issue. You can associate one specific color stylesheet for each section you are in.

e.g
div.content-view-line
{
with a different background for each section
}

laurent

Vytautas Germanavičius

Monday 11 April 2005 10:04:19 am

You missed one thing:
If i have same article in blue-style section(original location of article) and red-style section (additional location), the in both section that article will be shown using blue-section style.

My question was about how to use "Match[url_alias]". As i understood this is only one way to use different style on *SAME* article in different locations.
But NOBODY can answer to me, how make it work...

{set-block scope=root variable=cache_ttl}0{/set-block}

eZ debug

Timing: Jan 18 2025 22:23:16
Script start
Timing: Jan 18 2025 22:23:16
Module start 'content'
Timing: Jan 18 2025 22:23:17
Module end 'content'
Timing: Jan 18 2025 22:23:17
Script end

Main resources:

Total runtime0.7983 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.1250180.7813
Module start 'content' 0.00630.6766 768.9063620.9844
Module end 'content' 0.68290.1154 1,389.8906341.9609
Script end 0.7983  1,731.8516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5078210.0002
Check MTime0.00140.1807210.0001
Mysql Total
Database connection0.00060.080910.0006
Mysqli_queries0.721690.38782020.0036
Looping result0.00190.23682000.0000
Template Total0.769196.320.3846
Template load0.00210.257420.0010
Template processing0.767096.078620.3835
Template load and register function0.00010.011110.0001
states
state_id_array0.00110.139710.0011
state_identifier_array0.00090.109220.0004
Override
Cache load0.00180.2263440.0000
Sytem overhead
Fetch class attribute can translate value0.00100.128340.0003
Fetch class attribute name0.00150.182180.0002
XML
Image XML parsing0.00170.208640.0004
class_abstraction
Instantiating content class attribute0.00000.0019100.0000
General
dbfile0.00350.4326400.0001
String conversion0.00000.000830.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 33
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs