Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

jQuery: Facebox and a href="# issue


Go to End


2 Posts   1957 Views

Avatar
Terry Apodaca

Community Member, 112 Posts

20 March 2010 at 10:09am

I just found an issue where I am trying to use the Facebox (overlay) plugin and dynamically build the link to get the overlay. everything works fine:

<a  href="#listing-overlay{$ID}" rel="facebox">$Name</a>

except the pound sign '#' in the href is being replaced with the entire URL. Does SilverStripe do some kind of replacement behind the scenes with the pound sign...like a reserved word...and I am not aware?

the link ends up like this: http://4wayinvestments.tsg.net/listings/SearchForm?PropertyType[Office]=Office#listing-overlay9

when it should be like this: http://4wayinvestments.tsg.net/#listing-overlay9

Avatar
swaiba

Forum Moderator, 1899 Posts

24 March 2010 at 11:04pm

have you tried something like?

<a href="$Link#listing-overlay{$ID}" rel="facebox">$Name</a>

<a href="$BaseLink#listing-overlay{$ID}" rel="facebox">$Name</a>