Thursday 17 April 2008 12:24:24 am
Okay - I have used the admin interface only to create a new template override! So I did not play with the override.ini.append.php file. But here it's what's happening. I have a siteaccess called "aliman". Inside it there is this file called override.ini.append.php. I opened it and I found the following two things of interest to me:
[full_folder]
Source=node/view/full.tpl
MatchFile=full/folder.tpl
Subdir=templates
Match[class_identifier]=folder
[full_folder_products]
Source=node/view/full.tpl
MatchFile=full_folder_products.tpl
Subdir=templates
Match[class_identifier]=folder
Match[section]=6
The latter part (full_folder_products) was created using the admin interface. I clicked on design/templates/node/view/full.tpl. Here there is a whole bunch of templates for full product, article, etc... Anyway so I clicked on "New Override" at the bottom. Step 1. Here I chose extension "ezwebin". Okay I tried "no extension" as well but same result. Actually when I chose "ezwebin" I could no longer remove the file and it seems to look for it inside the root folder called design. It's like a mismatch somewhere. Step 2. I gave it a filename: "full_folder_products" Step 3. Class: I chose "Folder" Step 4. Section: I chose "Products" This section I did inside setup/sections. I also assigned it to the frontpage called "Products" from the standard ez installation. I also checked that everything under this node is part of the "products" section which they are. I also gave anonymous user rights to view this new section. Step 5. I chose a copy of the default template (I actually copied the content of the standard full_folder.tpl file...! I then modified it to add columns and so on...! I just want to represent all the products in a column format where the folder is for products. and the rest of the website to have the normal list display (one underneath each other one).... ! Now I tried removing all the templates, and so on...! I made it work by doing the following:
Step 1. I went physically inside the folder : \extension\ezwebin\design\ezwebin\override\templates\full Step 2. I copied the file folder.tpl and called the new one folder_products.tpl where I implemented my column view Step 3. I went inside the override.ini.append.php and copied the part where it says: But here it's what's happening. I have a siteaccess called "aliman". Inside it there is this file called override.ini.append.php. I opened it and I found the following two things of interest to me:
[full_folder]
Source=node/view/full.tpl
MatchFile=full/folder.tpl
Subdir=templates
Match[class_identifier]=folder
and I made it be:
[full_folder]
Source=node/view/full.tpl
MatchFile=full/folder.tpl
Subdir=templates
Match[class_identifier]=folder
[full_folder]
Source=node/view/full.tpl
MatchFile=full_folder_products.tpl
Subdir=templates
Match[class_identifier]=folder
Match[section]=6
Now it works properly! I can now go to products and view a column layout, and I can go to a normal folder and view a normal list layout...! But - it does not look right! I mean why must I go into the physical file system itself and modify? isn't the admin meant to do that??? And I have one big problem. I cannot acces the template for the standard folder view within the admin any more. Can you help me, please? I hope this was as informative as possible :) I tried the docs and all! I am sure it used to work the way I described at the beginning. Thank you in advance... Yours Mihai
|