From: Mitra <mi...@mi...> - 2002-12-31 07:36:47
|
Hi - and happy new year I'm having difficulty figuring out ways to smoothly move between different parts of a site. I can see how in the site/sites/site_greenpages.php3 file I am looking at an existing state string, and then a new state to change to, but for example ..... I have one state "h--1-" which is the home page, and this has a list of "Categories" on it, which are generated by a view, each item in the view wants to be a link that would wants to change the state to m=s i=_#SITEM_ID s=s which would be a state string of "s12345s1-" I also have to get teh site_id into the URL, since I'm trying to avoid having a one-line HTML file that contains <!#include /apc-aa+/module/site/site.php3?site_id=1a2b3c> I can see several choices to code this, none of which are pretty .... <a href="/apc-aa+/modules/site/site.php3?apc=s_#SITEM_IDs1-&site_id=a1b2b3c">_#HEADLINE</a> or <a href="/apc-aa+/modules/site/site.php3?apc={state}&m=s&i=_#SITEM_ID&s=s&site_id=a12b3c">_#HEADLINE</a> (I can abbreviate these slightly to <a href="?apc=s_#SITEM_IDs1-&site_id=a1b2b3c">_#HEADLINE</a> or <a href="?apc={state}&m=s&i=_#SITEM_ID&s=s&site_id=a12b3c">_#HEADLINE</a> But these aren't elegant either, and anyway {state} won't work in a View, unless I fix the code in item.php3 to look up variables in the apc_state array as well (a good idea, something I'll do unless someone says its a bad idea!) Although it would be even better if the code had been merged instead of two VERY similar syntaxes being written separately. There is a hint on this somewhere (I can't find the reference at the moment) where it refers to the apc={state} part being added to URLs generated by apc-aa. It looks to me like this code was written for a particular way of doing something, and not generalized, the trouble is I can't figure out how it was INTENDED to be used. - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |