Forums / Setup & design / Problem with template overrides in 3.1
Dave Royer
Tuesday 15 July 2003 7:22:34 pm
I am currently in the middle of designing a new site using Exponential (first attempt at Exponential, so it's a learning situation.) I had my overrides working pretty well in 3.0.2, but when I updated ez to 3.1, none of my node-specific overrides show up.
I still have all my override templates located in design/<my_design_folder>/override/templates/node/view/. I tried using the new stuff in Setup -> Templates but when I try to override the line.tpl file, for example, I can't select my design in the dropdown. My design folder does not show up, even though I have my design added to the AvailableSiteDesigns entry in the content.ini.append file. I tried editing the overrides.ini.append file directly but that didn't work either.
I've got to be missing something pretty basic, but I'm running out of ideas. Any suggestions?
Thanks,
Dave
PS: I found the article below which leads me to believe that I'm missing some seting somewhere. http://ez.no/developer/ez_publish_3/forum/suggestions/bug_in_template_editor_overrides_will_always_be_for_user_siteacccess_no_matter_what_i_select
Karsten Jennissen
Tuesday 15 July 2003 11:20:29 pm
Check here, this should help you:http://ez.no/developer/ez_publish_3/documentation/customization/custom_design/override_templates
Wednesday 16 July 2003 8:07:15 am
I have been using that document to try and get things working. Unfortunately something still isn't working.
After some work, I was able to get my site design to show up in the site dropdown on the Setup->Templates screen. After I set the design to my design, I am able to view the overrides I defined for the node/view/line.tpl file.
One of the overrides I have defined is:
[line_folder] Source=node/view/line.tpl MatchFile=line_folder.tpl Subdir=templatesMatch[class]=1
Which I believe should override all line views for class == 1 (folder). This shows up in the template setup page. I have the line_folder.tpl defined in design/mydesign/overrides/templates/line_folder.tpl. Turning on template debugging and viewing a page with several folders in it shows me that the line entries for the folders are using the design/mydesign/templates/node/view/line.tpl file.
Thoughts?
Wednesday 16 July 2003 8:15:51 am
Did you clear the cache? Maybe try to manually delete /var/cache.
Wednesday 16 July 2003 8:32:20 am
I rm -rf 'd the var/cache/* tree and still no change.
Thanks for the help!
Any other thoughts?? Is there any debugging I can turn on to see the logic how it's deciding which template file to use?
Thursday 17 July 2003 6:37:11 am
Update: I tried the generateoverridesettings.php script to generate an override.ini file. Again, all my overrides show up in the Setup -> Templates page but they don't show up on the site. I guess I'll try re-applying the 3.1 files in case some didn't copy over. Any other thoughts?
Thursday 17 July 2003 11:16:40 am
FIXED!
After much persistence, and alot more deleting var/cache than I thought I needed I found the source of my problems. I was mixing up where to use my siteaccess and where to use my custom design. After getting the overrides.ini.append into settings/siteaccess/<siteaccessname>/ and adding <siteaccessname> to both AvailableSiteAccessList[] and SiteAccessList[] I was able to get it working!