Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi,
I am building a website that has 3 templates using the awesome couchCMS.
> Template 1 has index
> Template 2 has locations
> Template 3 has cars

Seamlessly couchCMS creates my pages from each template as follows:
- from template 1 - home / profile / blog / contacts
- from template 2 - City > GarageAddress
- from template 3 - Car > UsedCarMake

All this works fine and allows me to have the proper links using the pretty URL function.
from template 1 -
http://localhost:8080/home/ etc
from template 2 -
http://localhost:8080/city/
http://localhost:8080/city/GarageAddress.html
from template 3
http://localhost:8080/car/
http://localhost:8080/car/UsedCarMake.html

However i am experiencing a problem when i try to generate a dynamic third page that aggregates the content of two templates (template 2 &3) using NewPageVar as my *add_querystring* variable in a link to the car as follows:

Code: Select all
<a href="<cms:add_querystring "<cms:show k_page_link/>" 
     "pid=<cms:show k_page_id />&city=<cms:show NewPageVar />" />" >
      Find A <cms:show k_page_title/> Garage Near <cms:show NewPageVar />
</a>


Everything works fine except the Pretty URL is not getting applied to this dynamically generated page: i end up with:>
================
http://localhost:8080/CarsWeb/Cars/Saloon-Cars/repair-used-toyota-corolla-nze.html?pid=8&location=at%20the%20City%20Junction%20Garage
Instead of
================
http://localhost:8080/CarsWeb/Cars/Saloon-Cars/repair-used-toyota-corolla-nze-at-the-junction-garage.html
Please let me know if there is a fix that can generate better link output so i can end up with the formatted URL as above.

The solution i was exploring is to add some HTaccess rules but i am not sure about this because i have very limited htaccess knowledge.

Please feel free to advise me if i have approached this all wrong and there is a hidden couch feature that i could utilize (i have to admit i have unearthed many *hidden* features by browsing through this forums).

Thanks in advance for the help/fix.
Hi,

I can assure you it is not a bug - Couch has some built-in rules for prettyURLs and the link you saw outputted is in perfect accordance wiith those rules.

If you want the URL structure to be something totally different from what Couch produces, you can instruct Couch to get out of the way and then do all the processing yourself - the 'Custom Routes' module allows you to do just this. Please see viewtopic.php?f=5&t=8981

Hope it helps.
Hi KK,

Thank you so much for that pointer. I have read through the Custom Routes documentation and it is EXACTLY what i needed to achieve my solution.

Couch is awesome. Thanks for all your work. (better appreciation is coming in terms of multiple license purchases once i am through with couchfying several commercial ideas i am working on.)

Once again. Thanks.
3 posts Page 1 of 1
cron