From: Norbert B. <br...@ch...> - 2003-05-21 08:34:47
|
From: "Mitra" <mi...@ea...> > >I think that the best way would be to move disucssions to a separate=20 > >slice/module, but it might be a lot of work. >=20 > I'm not sure about this .... the only weird stuff with Discussions=20 > was how it *was* integrated into slice.php3, so that instead of beign=20 > explicitly coded as a view, it was just a flag. Now - as a view - it=20 > makes more sense, but the code still makes some assumptions that only=20 > work when its incorporated into slice.php3. If discussions are standard slice/module, you can use all functionality = of views, customize fields or add discussion items by email. Now it is quite hard (in fact, I do not know how to do it) to show = recently added discussion comments (i.e. to show which news articles are = being discussed right now) or to show discussion with fulltext comments = instead of standard list of discussion comment titles with buttons (show = all, show selected, add comment). > The best solution - in my opinion - would be to drip slice.php3=20 > entirely, (except for some backward compatability stuff) and make=20 > view.php3 do everything we want.! This might solve some problems, but I am afraid of backward = compatibility... > >> I'd like to add the ability to do a Category list in Views, but = I'm > >> unlikely to get to that. > > > >what do you mean by "Category list"? >=20 > I want to be able to put a short menu at the top of a List View, that=20 > allows selecting a subset of the view based on the category. The key=20 > is that the list must ONLY show categories that actually have items=20 > in them. Not all the categories that can be entered in the add-item=20 > screen. We solved this by separate view that generates select box from = "category........" field from actual (e.g. news) slice. The problem is = only if categories use different "title" and "value" (stored in = database). Again - if the categories were standard slice/module, there = is no problem so show other field (e.g. title instead of id)... Just an example how we use categories for menu navigation. It is a = simple website with almost complete content control given to user. Might = be usefull for someone. We use three slices/modules: menu, articles, site =3D=3D=3D slice "menu": title (textbox) description (rich text textarea) parent category id (selectbox pointing to the same slice, showing = item titles, storing item ids) =3D=3D=3D =3D=3D=3D slice "articles": title (textbox) description (text textarea) fulltext (rich text textarea) category id (selectbox pointing to the slice "menu", showing item = titles, storing item ids) ... other fields... =3D=3D=3D =20 Then there is simple site module that inclues views and shows menu in = left column of the page and articles in right column: =3D=3D=3D module "site" structure: Header =20 =3D=3D=3D <!DOCTYPE html public "-/W3C/DTD HTML 4.0 Transitional/EN"> <html><head><title>Simple AA site</title></head> <body bgcolor=3D"#FFFFFF" link=3D"#0000FF" vlink=3D"#000080" = alink=3D"#800000"> =3D=3D=3D Top =20 =3D=3D=3D <h1>Title: Simple AA site</h1> <table><tr><td> =3D=3D=3D Menu (cat)=20 - SubMenu cat=3D.+ =20 =3D=3D=3D SubMenu: <dl><dd>{view.php3?vid=3D504&cmd[504]=3Di-504-{cat}} <br><br>{view.php3?vid=3D503&cmd[503]=3Dc-1-{cat}} <br></dd></dl> =3D=3D=3D - MainMenu =20 =3D=3D=3D MainMenu: = <dl><dd>{view.php3?vid=3D503&cmd[503]=3Dc-1-rootcatgegoryid} <br></dd></dl> =3D=3D=3D Main (x,cat)=20 =3D=3D=3D </td><td> =3D=3D=3D - Article x=3D[0-9] =20 =3D=3D=3D Fulltext of article: {view.php3?vid=3D507&cmd[507]=3Dx-507-{x}} =3D=3D=3D - List =20 =3D=3D=3D Category description and list of articles: = {switch({cat}).+:{view.php3?vid=3D505&cmd[505]=3Di-505-{cat}}:Welcome = to...} <br>. . . . . . . . . . . . . . . . . .<br><br> = {view.php3?vid=3D506&cmd[506]=3Dc-1-{cat}&set[506]=3Dlistlen-10,page-{pag= e}} =3D=3D=3D Footer =20 =3D=3D=3D </td></tr></table> =20 </body></html> =3D=3D=3D =3D=3D=3D View 503 shows submenu items View 504 show parent categories (path like "top > europe > slovakia > = bratislava" in this case) View 505 show fulltext description of menu item View 506 show list of articles (date, title, description) View 507 show fulltext of article (title, description, fulltext, etc.) =3D=3D=3D menu view No. 503 definition <a class=3D"menu" href=3D"?cat=3D_#ITEM_ID_">_#HEADLINE</a><br> [Condition 1 in this view is set "Parent category", "=3D", parameter = is left empty] =3D=3D=3D =3D=3D=3D menu view No. 504 definition {view.php3?vid=3D504&cmd[504]=3Di-504-{_#CATEGORY}} > <a class=3D"menu" href=3D"?cat=3D_#ITEM_ID_">_#HEADLINE</a> =3D=3D=3D Advantage of this setup is, that user can edit his menu and change = hierarchy hierarchy (even move whole subtree to another part of the = menu). Menu items contain rich text area field for item description, but = he/she could store there as much text as needed and easily create = special section of the site. All articles are categorized by the menu = items and displayed in proper section. I have the feeling that there are some historical relicts in the AA from = the age before "modules" and {} commands (e.g. slice.php3; different = conditions for slices and views; how discussions are stored in database; = categories) and they mix with new features. It is really hard for new = developers (sometimes also for me) to decide which feature/option to use = and how. Norbert Brazda CHANGENET.SK Mlynske nivy 41, 821 09 Bratislava tel/fax: 02-55560026, 0905-729359 SPAJAME LUDI, KTORI MENIA SVET ________________________________________________________________ Prinasame pohlad na svet ocami aktivnych obcanov. Vytvarame = nezavisly priestor=20 pre kriticke nazory a reflexiu diania okolo nas. Poskytujeme = nekomercne internetove sluzby pre neziskove organizacie a samospravy. |