I just took over maintenance of a highly custom theme for a client.
The site is news-themed site with all the pages having a three column layout, with each column being widget enabled. (You can see a demo of the site here: http://fishwrapped.com/). The client basically adds a bunch of widgets to each pages columns for display (mostly RSS widgets and a custom RSS feed widget plugin).
The way the theme developer made the site is not manageable in my opinion and I want to clean it up. The original dev made 100 different page templates all named in sequence (e.g. RSSPage1 … RSSPage100). Each template is exactly the same inside except for the page number. The page number is then used to define the left, middle and right sidebar widgets for that page.
As you can imagine this is quite unwieldy and a major duplication of code in my opinion. Also, as a serious side effect, when you try to load the Dashboard widgets page, 90% of the time your browser will stall because its trying to load up 100×3 dynamic widgets for placement.
However, I have been unable to think up a better solution with fewer page templates, that will allow the user to define custom pages and still allow him to have different dynamic widgets on each page.
Any thoughts or help would be appreciated.
- The topic ‘Trying to Avoid duplication in theme file layout’ is closed to new replies.