Log in

View Full Version : How Can I Change the Style via Navbar and Retain Page Settings?


Dr. Bantham
08-24-2008, 01:02 PM
I have integrated a style selection column within Navbar, but my current version resets the page to home:
<tr><td class="vbmenu_option"><a href="cmps_index.php$session[sessionurl]?styleid=21">Teatro Grottesco</a></td></tr

I discovered that if I include $vbpage in lieu of a file address that the current page location will be pulled. However, it does not retain the variables.
<tr><td class="vbmenu_option"><a href="$vbpage$session[sessionurl]?styleid=21">Teatro Grottesco</a></td></tr

In other words, it does not return you to the correct content view if you are viewing a forum, thread, post, etc. What are the variables necessary to allow this to function like the style selector box relative to retaining the current content view?

Opserty
08-24-2008, 07:22 PM
Try:

<tr><td class="vbmenu_option"><a href="cmps_index.php?styleid=21&amp;$session[sessionurl_q]">Teatro Grottesco</a></td></tr>

Dr. Bantham
08-24-2008, 10:42 PM
Try:

<tr><td class="vbmenu_option"><a href="cmps_index.php?styleid=21&amp;$session[sessionurl_q]">Teatro Grottesco</a></td></tr>
Thank you for the tip, but this did not work. The only impact it seemed to have was appending an "&" symbol at the end of the URL string. I tried the $vbpage variant as well, which again seemed to pull the correct file being used, but not the subsequent reference information.

Opserty
08-24-2008, 11:21 PM
Oh sorry I misunderstood the question. Try something like:

<tr><td class="vbmenu_option"><a href="$vbpage$session[sessionurl]&amp;styleid=21&amp;{$_SERVER['QUERY_STRING']}">Teatro Grottesco</a></td></tr>

{$_SERVER['QUERY_STRING']} should give you the extra reference variable things that you want. I'm not sure whether there maybe security implications or not for this.

Dr. Bantham
08-25-2008, 12:16 AM
Almost there, if you can manage another look. It pulls most of the info, though it has now dropped the file reference.

For instance, if I am viewing the following page:
showthread.php?p=11831#post11831

It now becomes:
&styleid=21&p=11831

The traditional style changer would result in the following:
showthread.php?p=11831&styleid=21#post11831

I do appreciate the attentiveness. If you cannot spare another look, perhaps someone else may offer another hint.

Dr. Bantham
09-03-2008, 11:44 AM
Can anyone provide suggestions for this? It appears that I am close, though nonetheless stuck.