Welcome Guest, Not a member yet? Register   Sign In
[Solved] How to have the calendar class use a different URI segment for yr/month?
#1

[eluser]WoolyG[/eluser]
Hi all,

Hopefully someone can help me out here. I have a calendar on a page using the URI (say for example) http://www.mysite.com/pages/by_page/21/


If the calendar prefs, I've set
Code:
'show_next_prev'  => TRUE,
'next_prev_url'   => base_url().pages/by_page/'.$this->uri->segment(3).'/',

.. which creates a link to the next and previous month, great. This creates a URL (once you click the month forward link) of http://www.mysite.com/pages/by_page/21/2011/02

How do I get the calendar to take its year and month inptu from uri segments 4 and 5?


Cheers,
WoolyG
#2

[eluser]WoolyG[/eluser]
Hey,

It's cool, I worked it out:
Code:
echo $this->calendar->generate($this->uri->segment(4), $this->uri->segment(5));
#3

[eluser]Basketcasesoftware[/eluser]
How about adding the [Solved] to the thread title?
#4

[eluser]WoolyG[/eluser]
Oops, sorry..
#5

[eluser]Basketcasesoftware[/eluser]
That's alright. I've probably forgotten to do it myself before. I know others have too, but in those cases it hasn't been fixed in the first reply by the guy who started the thread. %-P




Theme © iAndrew 2016 - Forum software by © MyBB