Actions Menu Anchor URL
Hi All,
I appreciate your help on this. I'm trying to edit the smarty code for the Actions block on the listings pages. I have a few items on the listing details (gallery, video,map) that are pushed down the page. It would be AWESOME if the actions menu had a few more useful navigation items, namely anchor urls that take the user directly to the map, gallery, video, etc. so they don't have to scroll.
So let's start with the video. I'm using the Google maps plugin and showing the map on the listing details page at the bottom.
In the language manager I added the url anchor right before the word map in the value field: <a name="map" id="map"></a>Map.
In the Actions block I edited the code to add a menu item "Map". Smarty pulls the current url + the listing ID and adds the url anchor on the end for the href. I added this right after the {/foreach} tag so the last line of smarty script looks like this:
{/foreach}<a href="{$smarty.server.PHP_SELF}?id={$listing.id}#m ap">Map</a>{/if}
This works flawlessly if I have mod_rewrite disabled in the admin configurations section; however, if it is enabled the smarty code still wants to use the non-rewritten url so I get a 404 error.
Basically, I need to know how to edit the smarty script to use this when mod_rewrite is enabled. While {$smarty.server.PHP_SELF}?id={$listing.id} gets the non-rewritten url, I need to pull the mod_rewrite url.
Does that make sense?
Thanks for your help!
|