Results 1 to 6 of 6

Thread: Problem with event-calendar

  1. #1
    New user
    Join Date
    09-28-10.
    Posts
    8

    Default 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? ops:

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Atlanta, Georgia
    Posts
    611

    Default 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.

  3. #3
    New user
    Join Date
    09-28-10.
    Posts
    8

    Default 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?

  4. #4
    Experienced user
    Join Date
    06-10-09.
    Location
    Atlanta, Georgia
    Posts
    611

    Default 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

  5. #5
    New user
    Join Date
    09-28-10.
    Posts
    8

    Default 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.

  6. #6
    User
    Join Date
    04-27-10.
    Posts
    134

    Default 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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •