Hi, I don't quite get it. Every component has a unique name. Possibly inside a subdirectory. Say we have a page "somewhere/foo" with a "somewhere/fooView" and a "somewhere/fooController". If you want to link to "somewhereelse/bar" your link may look like <a href="../somewhereelse/bar"> or just <a href="/somewhereelse/bar">. Where is the problem?
When I understand correctly you are scared, that you may want to move bar to another subdirectory, say "blub/bar" then you have to modify all links to that page. That is true. You have to identify the page somehow. This is done using the path. If you change the identifier you have to change the references. If you have some mapping where you can look up the directory of "bar" then you can just change the mapping. But then you have just one "bar". Why should you use subdirectories then when you use a flat naming scheme then? You can just put the foo into the main directory. You can implement some mapping class if you want. Tntnet don't forbid you to do it if you find, that it is useful. But I don't see any generic functionality Tntnet should offer for that. Tommi Am 26.09.2013 08:41, schrieb Olaf Radicke: > Hi Tommi! > > tank you for your answer. I think my question was not enough precise. what I > need is a method for generating links to view/controler. Not a set-method but > get-method. > > For example: > > I have a view/controler HelloWorldView/HelloWorldController and set the path > > app.mapUrl( "^/(.*)$", "$1Controller" ); > app.mapUrl( "^/(.*)$", "$1View" ); > > Later in a other view with path/name "StartPageView" i set a link this: > > <a href="HelloWorld">klick here</a> > > If now change the namespace (path depth) of this view component than this link > is broken. For example: > > app.mapUrl( "^/MyNewNamespace/StartPageView", "StartPageView" ); > > If i click now on > > <a href="HelloWorld">klick here</a> > > I get to [protokol][domain][port]/MyNewNamespace/HelloWorld. If i have > hundreds of links i get a lot of work. You know? If i can us a link generator > like this: > > <a href="<$$ app.url_absolute(HelloWorld) $>">klick here</a> > > than i get a absolute path of HelloWorld and all is fine. > > I hope, it is more clear now what I mean. > > The problem was i see is, our MVC concept has more than on component and > url_absolute() can gat back a link only to on component. So we need a > alias for MVC component bundles. > > Gratings > > Olaf > > ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ Tntnet-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tntnet-general
