Home › Forums › Calendar Products › Events Calendar PRO › Can VIEW AS list all views? (And a bonus question)
- This topic has 5 replies, 2 voices, and was last updated 10 years, 4 months ago by
Geoff.
-
AuthorPosts
-
November 30, 2015 at 2:37 pm #1032843
Mad Dog
ParticipantCan the “View As” box on the Events List page show all the views without having to click on it? We’re only using two views, but it seems counterintuitive to show the current view. Our users haven’t figured out to click there to find the other view. It would be much nicer if we could just list the two views….or even better, just list the one not currently being viewed!
And in a related question, is there a way to change the name “Photo View” since we’re not using it for photos so while we like the Tile look, “photo view” doesn’t mean much.
Thanks
December 1, 2015 at 8:15 am #1033252Geoff
MemberHey there!
Changing up the View as options is certainly possible, though I think it will take a bit of custom development to accomplish. If you override the modules/bar.php template, you will find the code for the views. They are wrapped in a <select> tag which creates the dropdown menu. You can remove that and change the options to links or buttons instead.
Be sure to check out our Themer’s Guide for more details on template overrides before getting started.
And in a related question, is there a way to change the name “Photo View”
Sure! In fact, we have a nice article that outlines the process step-by-step.
Cheers!
GeoffDecember 1, 2015 at 4:15 pm #1033501Mad Dog
ParticipantThanks Geoff. I’ve already made some changes to that file and I looked there but couldn’t figure out where this piece was happening. Thanks for pointing to it for me!
I’m wondering if you could give me a very quick hand on it. We’re only using two views and what I’d like to do is just display a link to the view you’re NOT currently on. Can I simply modify this to show “not_displaying” (to use a lay term).
<option <?php echo tribe_is_view( $view['displaying'] ) ? 'selected' : 'tribe-inactive' ?> value="<?php echo esc_attr( $view['url'] ); ?>" data-view="<?php echo esc_attr( $view['displaying'] ); ?>"> <?php echo $view['anchor']; ?> </option>Thanks!
MD-
This reply was modified 10 years, 4 months ago by
Mad Dog.
December 1, 2015 at 5:17 pm #1033521Geoff
MemberHey there!
I really wish I had a simple, quick solution for targeting the view that is not displayed, but I think it will take a little more custom development than I can whip up here in the forums. For example, you might want to consider wrapping those lines in a conditional statement that the current view dow not equal the one being displayed, so something like tribe_is_view() !== $view[‘displaying’]. Not sure that gives you a good starting point, but I hope it helps!
Geoff
December 1, 2015 at 6:26 pm #1033548Mad Dog
ParticipantThanks. I’ll give that a whirl.
On another way to do it, is there a simple way to show all views all the time and not have to click on it to show the other available views? That’s actually the big issue. It seems like an odd UX to see the current view and figure out to click on it to see the others.
LATER NOTE: I added class=”tribe-bar-views-open” to the code and it seems to force it open all the time (see below). Any reason not to do this or does it muck with anything else?
<div id="tribe-bar-views" class="tribe-bar-views-open">MD
-
This reply was modified 10 years, 4 months ago by
Mad Dog.
December 2, 2015 at 7:31 am #1033860Geoff
MemberThat’s a cool way to do it! I hadn’t thought of using CSS to force the menu open but that is certainly easier than rewriting the code in the template. I say keep it if it does the trick. 🙂
I’ll go ahead and close this thread since it seems we’ve covered this about as far as we can here in the forums–nice work!
Geoff
-
This reply was modified 10 years, 4 months ago by
-
AuthorPosts
- The topic ‘Can VIEW AS list all views? (And a bonus question)’ is closed to new replies.
