Problem with event-calendar
Hi there,
I have a problem! I am building an event-calendar were I have to split up classes and build a new template for the php, because I will put the monthday for it selv and the month and year on the next line. But the php won't work? Someone know the right way to do it like this?
Hope I am clear? :oops:
Re: Problem with event-calendar
I actually don't really know what you're talking about. :lol:
Can you tell us what frontend module you're planning to use and how you'd like to change it? Most likely you'll be able to make a simple change to an events_*.tpl file to solve your issues. You can do this through Layout > Templates.
Re: Problem with event-calendar
All right, I'll give it a shot again with a little more information.
I have this event-calender I wan't to change the appearance at. In the left side, I will have monthday at one line, and under that I wan't month and year to be. In the right side there will be information about the event.
I tried to change a bit in the code of the template-file, but the following code won't work:
<?php echo $this->mday; ?>
<?php echo $this->month; ?>
<?php echo $this->year; ?>
It's wierd, because the only echo who works is "month" and that works perfect! But both mday and year dosen't appears?
Was this better? Am I totally wrong or is it only something in the php-code who f*cks up? :(
Re: Problem with event-calendar
Add this code from here to your template. It will give you a list of all available template variables: http://www.contao-factory.com/code-detail.html?id=7
Re: Problem with event-calendar
Thanks a lot Ben!
It helped me a lot - mday and year dosen't showed up as possibilities (which I don't understand, but let that be for now). Now I now what is possible and what is impossible. Thanks again! You saved my day - and it's a great function, btw. ;)
Re: Problem with event-calendar
One way you can change the date formatting by replacing
Code:
<?php echo $this->date; ?>
with
Code:
<?php echo date("d m Y", $this->time); ?>
Hope that helps