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}

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.