Enable Modal Toggle Hash in URL (Cornerstone/Pro)

Hello! Here’s my modal toggle button design, just for a pretty picture.

Now the ask: I’ve set the Toggle Hash to “rose-hill”. I want the URL to reflect the /#rose-hill hash when the modal is activated (there’s a form nested inside that pulls the URL so that a sales agent knows exactly which floorplan spurred a form conversion).

Is this possible via a setting?

Thanks!

Hello @Rule72,

Thanks for writing in! Regretfully there isn’t any setting that allows a hash URL to open the modal popup on the page. You will need a custom javascript code to be able to do that. Please note that custom coding is outside the scope of our support. Issues that might arise from the use of custom code and further enhancements should be directed to a third-party developer.

Note: We are unable to provide support for customizations under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One or Care service for further assistance.

Best Regards.

1 Like

Thanks for the reply!

My wording might have been off, let me rephrase: I’m not trying to open the modal via anything externally. Rather, when a user clicks on the modal button, the …/url/ should theoretically change to …/url/#hash on its own.

I believe at one point a few years ago, this was the way the modal used to operate (but I may be wrong). Is there a way to reimplement this without resorting to custom code?

Hey @Rule72,

Regretfully, this has not been a feature of the modal elements yet so this would really require custom development.

What I’ll do for this case is add this to our internal feature request list so if our development team sees a good method to achieve this and if it won’t affect any functionality of the modal, they might add this in one of the future releases. Feature demand is also a factor in adding features.

Thank you for understanding.

Ok, thanks!

Just for this topic’s completeness: my workaround for now is to make a modal, hide the toggle with CSS, then add another simple button to trigger the modal hash and open the popup. This will allow a nested form to grab the URL (including hash) and forward the useful metrics to the receiver for their sales stuff.

Hi @Rule72,

Thanks for your tips! If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.