Home › Forums › Calendar Products › Events Calendar PRO › Creating and registering an own view template
- This topic has 5 replies, 4 voices, and was last updated 9 years, 2 months ago by
Thomas Bügel.
-
AuthorPosts
-
January 10, 2017 at 2:53 am #1215695
Thomas Bügel
ParticipantI want to create a very compact list view template showing all upcoming events for the next half/full year (changeable by the the user). Every event should use only one singe line if this view type will be selected.
Now I could customize the existing list view type, but this is very different. I more like to create a new one that I can choose in the settings as default type, if a user is going to show the events. And it should be selectable in the filter bar below under “view as” like photo, list, month, day aso.
I could not find how to create a very new view template and not changing an exiting one. I could only discover how to copy and paste existing views form “the events calendar” plugin or “events calendar pro” plugin to my themes folder to customize/override it. But I want to create a very own new template. That has to be selectable in the display settings tab of the events in the section “select event view”, “standard view” and “mobile standard view” (may be that are not the exact expressions of the display settings tab in the English original, because I translated it from a German website)Thanks in advance
Tom
January 10, 2017 at 7:48 pm #1216301Hunter
ModeratorHi Tom,
Welcome back and thank you for posting to our premium plugin forums. I really like the idea you’ve described, but it would take more customization than we’re able to provide. You’d most likely have to hack some core files which is not recommended. I wish I had a better answer for you, but as I said above, I like the idea and see the validity behind your request, so my recommendation is to submit it to our UserVoice Feature Ideas page.
Have you tried searching our forums to see if you can find any examples of users building additional custom views? If not, that might be a good place to start.
Sorry I don’t have a better answer for you at this time and if it’s a must-have feature, you might want to have a look at our list of customizers to see if anyone can help further assist.
If you’re not already aware of our What support is provided for license holders? Knowledgebase article, it’s recommended you take a minute or two to review what we’re able to cover in the forums.
Thanks again and good luck building the custom view. Cheers!
January 11, 2017 at 2:20 am #1216423Thomas Bügel
ParticipantHello Hunter, thank your for your reply. I didn’t really expected to get here some kind of tutorial, what I have to do, to get a solution for the feature I want to implement. But it would be helpful, if the core concept of the events calendar plugin would be explained in deep in some kind of a developer guide. The pro plugin adds some more event view types as photo and map. If there would be some kind of description how the pro plugin implements that, I would surely be able to create a plugin that adds a new view type too. I hacked the pro plugin and discovered only in src/Tribe/Main.php the code in line 473:
tribe_update_option( ‘tribeEnableViews’, array( ‘list’, ‘month’, ‘day’, ‘photo’, ‘map’, ‘week’ ) );
But that not seems to be the place where the view types are initialized. Adding a new view type to that array has no effect. It seems to be very tricky coded. A short hint, where the view types of the pro plugin are initialized would quite help me a lot. I hope you can support that.Thanks in advance
Tom
-
This reply was modified 9 years, 3 months ago by
Thomas Bügel.
-
This reply was modified 9 years, 3 months ago by
Thomas Bügel.
January 11, 2017 at 3:23 pm #1216987Hunter
ModeratorHey Tom,
I understand your frustration, but I’ve never added a custom view myself, so without knowing where to begin and not being permitted to provide customizations, the best advice I can offer is essentially what I provided in my initial response.
The best route is to inspect the code and use the actions/hooks in place to code it, which certainly is not an easy task. If the view you are trying to make is similar to an existing one, I’d say modifying via template override the way to go. After we release 4.5, new views will be much easier. For now, they are admittedly more complicated than they should be.
One last option is to use our Agenda view as an example, though it’s fairly dated at this point. Again, my apologies I don’t have more information available and good luck.
February 2, 2017 at 8:35 am #1228257Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
This reply was modified 9 years, 3 months ago by
-
AuthorPosts
- The topic ‘Creating and registering an own view template’ is closed to new replies.
