jds43 Posted December 22, 2021 Share Posted December 22, 2021 Hello, I'm needing to whitelist a paginated link (href='{$page_url}?remove=$item->id') within _func.php. Does anyone have some information for this? Link to comment Share on other sites More sharing options...
dotnetic Posted December 22, 2021 Share Posted December 22, 2021 Could you please describe more specific what you are trying to achieve? What you mean by "whitelist"? Link to comment Share on other sites More sharing options...
jds43 Posted December 23, 2021 Author Share Posted December 23, 2021 I have a large selection of location cards rendered by a function in _func.php, successfully paginated to 12. Within the cards, I'm using an onclick event in JS to perform an async request utilizing the url of a link referenced as a property ($page_url = $page->url) of the function. It only works on the first page. After that, the async function doesn't work properly because the url of the link in the card is localhost:8888/results/?add=2353 instead of localhost:8888/results/page2/?add=2353. Link to comment Share on other sites More sharing options...
jds43 Posted December 27, 2021 Author Share Posted December 27, 2021 Hello, I think this did the trick: if(wire('input')->pageNum > 1) $page_url = wire('page')->url . wire('config')->pageNumUrlPrefix . wire('input')->pageNum; Based on Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now