0

Say it I have such node alias: example.com/content/my-fancy-page/

If user enters to node above, he will see default page content of my fancy page. After some process I will redirect him to this: example.com/content/my-fancy-page/tt3741/ or this example.com/content/my-fancy-page/tt3802/

  1. Regarding to user's selection he will see the "tt3741" or "tt3802" content that resides inside database. Is it possible to do this with hooking etc. When I try "example.com/content/some-old-page/foobar" in my old website I get 404 error. So is it nt possible?
  2. Is it possible to cache these three addresses seperately with Boost module? Or Boost only caches "/my-fancy-page/"
  • How do you redirect users? What is exactly tt341, or tt3802? – kiamlaluno Dec 12 '12 at 8:43
  • I give them some options inside an HTML form. If user selects option 1, I redirect him to tt341, if he selects ooption 2 I redirect to tt3802. Say it he selected option 1. Inside "tt341" page I have two options again. Regarding to answer, user will be sent to another page. – trante Dec 12 '12 at 15:10
  • Are tt3802, and tt341 path aliases? May you show the code you are using to redirect users (JavaScript, or PHP code)? – kiamlaluno Dec 12 '12 at 19:43
  • Thank you for your interest.. They can be path aliases or not. I didn't write any code for this feature. I'm just trying to design the structure.. Constraints are like this: - Every node has its own sub nodes - Sub nodes will have a string code inside URL, so I will get relevant data from database - Pages will be cached by boost. – trante Dec 12 '12 at 19:56
  • I was wondering about your, "Because now it gives a 404 error." I thought you already wrote code, and you were wondering why it didn't work. If that were the case, it would be better to show the code. – kiamlaluno Dec 12 '12 at 20:09
0

Path aliases must be exact, thus if you want my-fancy-page/tt3741 to work you need to create an alias for it. If you link to the node path node/6 then node/6/tt341 will work. This has to do with how hook_menu works vs how path aliases work.

If you wish to hack around how path aliases work you can try out the PURL's Path Extensions feature http://drupal.org/project/purl or use hook_url_inbound_alter() to get the correct node given the unique alias.

Boost will work as long as each URL is unique (same as drupal's core cache). Good luck.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.