Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete in the Frontend with Subsites #30

Open
hudhaifas opened this issue Dec 26, 2016 · 1 comment
Open

Autocomplete in the Frontend with Subsites #30

hudhaifas opened this issue Dec 26, 2016 · 1 comment

Comments

@hudhaifas
Copy link
Contributor

When use AutoCompleteFiield on the fronend with Subsite module; the autocomplete field in the frontend fails to call the Suggest function without the SubsiteID parameter included in the SuggestURL

public function getSuggestURL() {
        if (!empty($this->suggestURL)) {
            return $this->suggestURL;
        }

        // Attempt to link back to itself
        return parse_url($this->Link(), PHP_URL_PATH) . '/Suggest?SubsiteID=' . Subsite::currentSubsiteID();
}
@wilr
Copy link
Contributor

wilr commented Mar 29, 2017

IMHO, so many modules use variables etc translatable, subsites, versioned etc etc probably out of scope for the module to handle all the variables. Perhaps use $field->setSuggestURL() to handle your specific instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants