We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Change the default active tab or button | Forum

Wells Anderson
Wells Anderson Sep 17 '18

We bought Advanced Photo Plugin. We love it!

We'd like to tweak something that is not supported in the plugin, but is also something common in Oxwall.


Our PHOTOS page now has 3 tabs or buttons:

Photos  Albums  My Albums


We would like the Albums tab to be selected, not the Photos tab when the user goes to the PHOTOS page.


When I inspect the Photos element in the source, it falls within the tag:  li class="_photo  active"

If I could have Oxwall make the Albums element active instead, I'd have a solution!


Any help would be appreciated!

The Forum post is edited by Wells Anderson Sep 17 '18
Darryl B Leader
Darryl B Sep 17 '18
You might want to ask the dev since this is custom coded by them.  They could probably point you to the right file.
Wells Anderson
Wells Anderson Sep 18 '18
I have contacted them and they can do custom coding, but the cost may be prohibitive.


I was hoping there is a way to change the active tab that is active when opening various pages. For example, VIDEOS has the Featured tab active.





Also, EVENTS has 4 tabs and the last one is the active one on opening the Events page. Is there a way to set which tab is Active when opening a page?

Mike
Mike Sep 27 '18

Hey Wells,


i dont know the advanced plugin but you can have a look at the registered urls from the plugin ("ow_plugins/pluginname/init.php")

Now you must find the URL where you want to change the tab

Looks like (example from normal photo plugin):

OW::getRouter()->addRoute(newOW_Route('view_photo_list', 'photo/viewlist/:listType/', 'PHOTO_CTRL_Photo', 'viewList', array('listType'=> array('default'=> 'latest'))));


there is a default parameter for listType. Try to change this to the one you want. (Also clear cache if it doenst work first)