State Navigation

Good Afternoon

My question may seem easy, but I simply can’t get it do (being realtively new to Rhythmyx and Velocity/JEXL)

I have states drop down. When you select a state it should take you to the corresponding page on the site with the dropdown being the part of the global navigation.

I did create a state content type and sveral corresponding state content items(Marylanbd.html, Virginia.html etc. I did create a state template <H1>(Welcome to #field(“Name”))</H1>

However, I am really not sure how to locate the state content items to link to them when selecting corresponding state. I did try $rx.location.generate but it just can’t locate any templates. What is the best solution, should I use $rx.nav? should I use $nav navigation variables?

Thank you very much for your support

Consider that Percussion CM System is not an app server. It’s designed to publish static files.

Generally, the recommended approach would be to either
1. use a JQuery control that filters on an XML resource file (for displaying US State data.) The advantage to this approach is that your pages would function in Preview mode. Alternatively you could…
2. create a form handler to accept your form’s params - this could be done in PHP, JSP, etc. The handler itself could be managed in and published from CM System, but you’d need an interpreter on the delivery side, and your forms would not work in standard Preview mode.

Best regards,
Chris Leger

Chris, thank you very much for you quick reply!

However, I though that is what I was trying to do! I was going to create 50 static pages (one content item for every state using the state template). Is that still impossible to in Rhythmyx?

I also heard that it is possible to use Navon and/or Landing Page objects? Is that is the case, how?

Thank you again for your advices

P.S. The option #2 you suggested I can’t implement unfortunately. Our cleint wants to you Percussion only

Creating your 50 State pages is entirely in-scope, appropriate, etc.

But you are trying to redirect to one of those 50 pages based on the output of an HTML form (if I understood you correctly.)

For that, you’d need a form handler of some sort, or else some Javascript or similar to rewrite the target of the form on some event.

You can use Navons & Landing pages to set up item links… you could even iterate over navons to populate your form select elements (e.g. if you had 50 folders - one each for your 50 state pages, with Navons in each, though this would certainly not be our recommended approach, you could iterate over those to build your form) but this would still not give you the application-style functionality you’d need (i.e. some sort of from handler) to manage your redirect.

The kind of functionality you’re after is “front-end” delivery-side functionality - traditionally handled with CGI scripting, or app server templating. If you want to manage it in the context of static HTML pages, I recommend looking at what can be done with JQuery/AJAX… light boxes, filters, etc.

Best regards,
Chris Leger

Is this a single site implementation? If so, you may want to add a slot to the navigation in which you can put all those states.

If it is multiple sites, then you could look at adding and item (say a brief) to the navigation slot that will render your “quicklinks” given a specific sys_title (say --statequicklinks–).

In either case, you will probably want to style the item (I would go with a list and use css to create a drop down effect…that way you don’t have to fool around with forms and javascript).


Update: sorry didn’t completely read your post. How did you create your states drop down? In the above methods, the states are being inserted into a slot (1) or as inline links (or templates as in case 2). If you needed to manually generate a link to the individual states page without doing the above options (using the system to make the link), you will need the content ids of the pages. If you are getting a Template not found error or something to that effect when using $rx.location.generate, either specify the template directly (second parameter) and /or make sure that the template is visible to the site (So that it will be the default template for the state content type). I would not recommend hard coding the content ids in the template (I would go with the above methods), but that is your option.

Jitendra, thank you very much for your answer

That is I think a single site implementation with multiple pages. The dropdown is a simple HTML select with all US state listing. When I select a state and click GO button, the site should take me to an individual state page. The state selector is located on the right side navigation bar. The only option so far recommended is Automated Slot. Is the only solution?

Thank you very much again