Using Query Parameters

Post Reply
User avatar
CrazyBread
Master Bludit
Posts: 58
Joined: Tue Jan 19, 2016 9:51 pm
Location: Germany
Contact:

I'm writing a little calendar plugin which shows a complete month.
It has two buttons "prev month" and "next month" to switch the current displayed month.

Per default, the calendar is shown on a particular page:

http://localhost:8080/index.php/kalender

this works just fine.
When I now want to see the previous or next month, my plugin is looking for some query parameters:

http://localhost:8080/index.php/kalende ... &year=2021
> Show Month August of year 2021.

Sadly, Bludit is showing me the "site does not exist" page.
How can I say bludit to ignore these query parameters so that my plugin can receive these?
Or is there a better way to do this?
User avatar
Edi
Site Admin
Posts: 2466
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

CrazyBread wrote: Mon Jul 26, 2021 4:45 pm When I now want to see the previous or next month, my plugin is looking for some query parameters:

http://localhost:8080/index.php/kalende ... &year=2021
> Show Month August of year 2021.

Sadly, Bludit is showing me the "site does not exist" page.
?month=08&year=2021 works for me.

Why do you use index.php?
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
CrazyBread
Master Bludit
Posts: 58
Joined: Tue Jan 19, 2016 9:51 pm
Location: Germany
Contact:

I pasted the complete URL of the browser.

You are right. When I remove "index.php" it works.
After I click on Prev or next month it reappears... strange.
User avatar
CrazyBread
Master Bludit
Posts: 58
Joined: Tue Jan 19, 2016 9:51 pm
Location: Germany
Contact:

I fixed it by building the links with "$page->permalink()".
Now it works like a charm!

Thanks for the hint! 8-)
Post Reply