Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > General Discussion > Customizations (Themes / Templates)

Customizations (Themes / Templates) Help with customizing the themes and templates. Post your own custom themes for others to enjoy.

Closed Thread
 
Thread Tools Search this Thread Display Modes

Display name of category in event, list view
Old 03-28-2011, 10:19 AM   #1
gregwoods
Calendar User
 
gregwoods is offline
Join Date: Mar 2011
Posts: 3
Default Display name of category in event, list view

I'd like to display category names at the top of every event in the list view.

What I'm looking for is something along these lines (in templates/events.php):

HTML Code:
<!--body-->
<div class="event">
  <h1>[category_name]</h1>
  <span class="event_date">[date]</span> &nbsp;
  <span class="event_time">[time]</span>
  <span class="event_title">[title]</span>
  [descr]
</div>
<!--body-->

<!--foot-->

<!--foot-->

<!--empty-->
<p class="notice">There are no entries to display.</p>
<!--empty-->
Of course the above doesn't work, as [cateogory_name] is just a variable I made up here. I'm hoping there is a pre-existing template variable available that I can just stick in there and call it a day. I tried [category] but that only gives me the category ID number, it seems.

Along those lines, a list of all the possible template variables would be handy.
 

Old 03-28-2011, 10:22 AM   #2
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,878
Default

Are you looking for the main category name? As the main category is usually for coloring the events. All other categories should display their name.
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 

Old 03-28-2011, 10:43 AM   #3
gregwoods
Calendar User
 
gregwoods is offline
Join Date: Mar 2011
Posts: 3
Default

When the client creates an event they pick one of serveral cateogories from a drop down menu (I guess thats considered a main category?), and they wish for that name to appear in the event listing. Currently the only information displayed is the date, time, title, and description.

I'm not sure I'm understanding the distinction between main and non-main categories. I'd rather not introduce a second category drop-down menu for the client to have to pick from if its essentially going to mirror the first one anyway.
 

Old 03-28-2011, 11:21 AM   #4
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,878
Default

Right now, the main category sets the colors when events are viewed. Any other created category will display the name of the category and it's selection.
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 

Old 03-28-2011, 03:55 PM   #5
gregwoods
Calendar User
 
gregwoods is offline
Join Date: Mar 2011
Posts: 3
Default

I ended up hacking it in using text images that corresponded to the ID number presented by the [category] template variable. Feels ugly doing it this way but it got the job done. In the future it would be nice to be able to access the text value of a main category directly.

Anyway, I hope that idea helps others who might be looking for a similar effect.
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display the date on list view... tesha Wordpress 7 10-09-2010 01:39 AM
Don't display time if no time in event (List Mode) Mad Dog Customizations (Themes / Templates) 7 09-23-2010 12:01 PM
Category titles in list view smor2100 Customizations (Themes / Templates) 1 01-28-2009 06:09 PM
Add Category List to Other Display Modes totalnet Customizations (Themes / Templates) 1 01-27-2008 04:02 PM



All times are GMT -4. The time now is 07:47 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |