This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » what should be written in...
expandshrink

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

Monday 04 April 2005 5:01:17 pm - 4 replies

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

Monday 11 April 2005 2:58:36 pm

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

Monday 11 April 2005 5:59:16 pm

sad.gif Emoticon 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 ...

Monday 11 April 2005 6:34:44 pm

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

Modified on Monday 11 April 2005 6:35:32 pm by laurent le cadet

Monday 11 April 2005 7:04:19 pm

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...

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from