bug in index.php, $view variable, archives and 404
Posted: Sat Nov 25, 2006 5:12 pm
Hi everyone,
I've been playing around with the $view variable in templates and I've discovered a couple of bugs.
Archives: index.php assigns $view 'archives' to both the overview page and the archives pages. Overview pages are handled by entries.tpl and archive pages are called by the $ARCHIVES variable in content.tpl. So both are different from each other, with different smarty template files, and even different permalinks (archive vs archives) yet both are assigned $view == archives. Can I suggest that in index.php that the actual archives page are assigned $view == archive, and that overview pages are assigned $view == archives? This will allow proper use of $view in template files.
404: I've noticed that an obviously incorrect url such as badly spelling a permalink (try archiv instead of archive) will set $view == 404, and this allows template designers to setup a custom 404.tpl file. However, a badly formed entry url doesn't generate a 404, instead it is handled in entries.tpl by the {foreachelse}no entries to print{/foreach}. Try changing the entry id part of an entry url to a number that does not exist (ie the entry has been deleted or has not been written yet). Surely this should generate a 404 as well. Are we able to look into this?
I've been playing around with the $view variable in templates and I've discovered a couple of bugs.
Archives: index.php assigns $view 'archives' to both the overview page and the archives pages. Overview pages are handled by entries.tpl and archive pages are called by the $ARCHIVES variable in content.tpl. So both are different from each other, with different smarty template files, and even different permalinks (archive vs archives) yet both are assigned $view == archives. Can I suggest that in index.php that the actual archives page are assigned $view == archive, and that overview pages are assigned $view == archives? This will allow proper use of $view in template files.
404: I've noticed that an obviously incorrect url such as badly spelling a permalink (try archiv instead of archive) will set $view == 404, and this allows template designers to setup a custom 404.tpl file. However, a badly formed entry url doesn't generate a 404, instead it is handled in entries.tpl by the {foreachelse}no entries to print{/foreach}. Try changing the entry id part of an entry url to a number that does not exist (ie the entry has been deleted or has not been written yet). Surely this should generate a 404 as well. Are we able to look into this?