WordPress-Seattle / contractor-directory

Creates a browesable and searchable contractor directory on your site by updating the user profile page
3 stars 0 forks source link

Theme overridable views #7

Open blobaugh opened 11 years ago

blobaugh commented 11 years ago

Create default views in the plugin views folder but allow the themer to override view templates in the theme

BrookeDot commented 11 years ago

I think the idea here was to just allow the user to override this in their stylesheet. See #1 Which would be simpler than having them override the whole view.

blobaugh commented 11 years ago

Similar, but not the same. That discussion dealt with the css file specifically residing in the theme directory. With this ticket everything will exist inside of the plugin. The themer will still has the ability to override the css in their own theme css files, however what happens when the elements need to be structured entirely differently or have different markup? The themer would be required to hack the plugin which would prevent the possibility of future updates and additions. What this ticket is proposing is a fairly standard practice whereby the plugin provides a default view template in the plugin and the themer has the ability to create an additional file in the theme folder that will override the template in the plugin itself.

One thing to keep in mind during this project is that any plugin we create we would also like other Meetups to be able to setup on their sites to replicate functionality that we have. This method will create the most amount of flexibility possible.

@itsananderson and @iandunn can you chime in here with your vast wisdom?

iandunn commented 11 years ago

Yeah, I think it's a good idea to let users override the view itself, in addition to letting them override the CSS. There are use cases for doing both together, and for doing either of them individually.

It's really simple to setup, but has a huge impact on extensibility for other devs.

itsananderson commented 11 years ago

I agree. Simple to implement, and it makes the markup much easier for theme authors to customize.