236 posts
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
GradaStudio says

Hey guys, after coding several themes over the years, i kind of want to stick to one common practice to organize all my themes. Here is my most important question.

Suppose we have a slider ( or social links or contact form ) in every theme. There are two approaches possible.

1. Have all the files of Slider module in one folder like so mytheme/lib/slider —> slider.php

mytheme/lib/slider/core —> class.slider.php

mytheme/lib/slider/js/—> slider.js and other js files

mytheme/lib/slider/css/—> slider.css or other style files ( less sass etc)

2. Have common folder for js and css files etc of all modules of themes like so mytheme/classes/ —> class.slider.php

mytheme/js/—> slider.js and other js files

mytheme/css/—> slider.css or other style files ( less sass etc)

Which approach you guys suggest ??

203 posts
  • Has sold $40,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
  • Contributed a free file of the month
  • Has been part of the Envato Community for over 2 years
+3 more
ikaruna says

My approach is something like this Approach (still, I’m new to this , but I’m looking to ease out my work within the future). Ex: you always use a portfolio, I have like a generic portfolio so I could say new GenericPortfolio, or a portfolio with multiple images would extend GenericPortfolio ….and so on.

You know what would be great :), to build a framework so powerful that allows you to build themes on the fly, than build a desktop-touchscreen app that allows you to build it visually by dragging items – Minority Report style :) – you would have a theme ready within hours.

cheers! jayc

236 posts
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
GradaStudio says

thanks for reply, Nice approach SakuraPixel.

Looking forward for more expert comments.

by
by
by
by
by
by