2

I want to call particular container page with different url patterns

www.abc.com /accounts/india- accounts /account-details?id= XXXXX

www.abc.com/ accounts /india- accounts / account-details /xxxxx

here account-details is the common container page. where xxxx value changes every time.

2 Answers2

1

I haven't find a way to do it yet. Opencms need to have a vfs resource in db to be referenced, if you have no resource 404 is "thrown".

There are some ways you can walkaround it.

  1. If you have few resources, use siblings;
  2. If you have undefined numbers of possible combinations, I would use apache httpd (or varnish or nginx or whatever you like) rewrite rule;
  3. You may implement some kind of vfs driver that is aware of that behaviour (I think to much complicated).

Second solution is what I used it in a project just finished adapted to your case.

in the httpd virtual host:

RewriteCond %{REQUEST_URI} ^/accounts/india-accounts/account-details/.*$
RewriteRule ^/[^/]+/accounts/india-accounts/account-details/.*([^/]+)/?.*$ %{REQUEST_URI}?id=$1 [QSA]

RewriteCond %{REQUEST_URI} ^/accounts/india-accounts/account-details.*$
RewriteRule ^/accounts/india-accounts/account-details.*$ /opencms/opencms/accounts/india-accounts/account-details [PT,QSA]

Hope it helps

Cavva79
  • 379
  • 6
  • 17
  • 1
    in my case india-accounts is the container page, how to deal to display this container page. will apache httpd will work – Gora Jan 21 '16 at 17:41
  • Yes, you have to remove the /account-details and to point directly to india-accounts. – Cavva79 Jan 21 '16 at 18:35
0

What do you want exactly?

I think you just want to use the value of the id=XXX to do something with the container. Something like this http://aeromexico.com/es/viaja-con-aeromexico/equipaje/?site=mx , if you change de 'mx' to 'ar' the text and the flag will change.

To do this you just have to use a scope in your template. Remember is the first thing loaded. Or if you want to change the container example from content-type list to something else you will need the exact location of that content-type.

FAC
  • 51
  • 5