Can VIEW AS list all views? (And a bonus question)

Home Forums Calendar Products Events Calendar PRO Can VIEW AS list all views? (And a bonus question)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1032843
    Mad Dog
    Participant

    Can 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

    #1033252
    Geoff
    Member

    Hey 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!
    Geoff

    #1033501
    Mad Dog
    Participant

    Thanks 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.
    #1033521
    Geoff
    Member

    Hey 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

    #1033548
    Mad Dog
    Participant

    Thanks. 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.
    #1033860
    Geoff
    Member

    That’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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Can VIEW AS list all views? (And a bonus question)’ is closed to new replies.