Page 1 of 1
Calendar control?
Posted: Tue Sep 04, 2007 11:51 am
by idan sharon
Hi All,
I want to add a calendar control to my component, just like the one that is used in the "Add new content item" In J!1.5
Can someone point me in the right way?
Thanks,
Idan.
Re: Calendar control?
Posted: Tue Sep 04, 2007 7:38 pm
by ianmac
Take a look at the JParameter class and the JElementCalendar class. This is probably the easiest way to do it (the easiest way I've found).
Ian
Re: Calendar control?
Posted: Wed Sep 05, 2007 8:29 am
by idan sharon
Hi Ian,
I've found the JParameter class in the reference wiki, but the JElementCalendar doesn't exist there...
Can I get a link?
Is this the way it's done in the "Insert new content item" page in the administration?
Thanks again,
Idan.
Re: Calendar control?
Posted: Wed Sep 05, 2007 1:22 pm
by ianmac
Indeed you are right... that class must have been created after I created the docs for the Parameter package.
It is still the same idea as the other ones. If you look in the com_content admin directory, you will see a article.xml file in the models directory. These is the parameters for articles.
So, you create a JParameter object something like:
$params = new JParameter( $row->params, JPATH_COMPONENT_ADMINISTRATOR.DS.'models'.DS.'example.xml' );
And then: echo $params->render();
Ian