Welcome to WebmasterWorld Guest from

Forum Moderators: ergophobe

Message Too Old, No Replies

File structure, and password protection advice

Images, style sheets, and pages



9:16 pm on Mar 15, 2014 (gmt 0)

10+ Year Member

My website has both a guest area, and a members area. And I'd like advice on how to best structure the files. Mostly the style sheets and images. For the content pages, I'm thinking put all the member pages in one folder, and then password protect everything in the members folder.

Most of the style sheets are external, and right now my thoughts are to structure them as if there are two separate sites in one. That means having a main external style sheet in the guest folder, and a duplicate one in the members folder that style the paragraphs, anchors, and other things. And then having separate external sheets in separate folders that style groups of pages. For example, one area in the members section is a hotel, and it has several pages associated with it.

Basically, I've got a guest area and a member area, both with styling and images, and I'd like advice on how to structure the files.


3:45 pm on Mar 16, 2014 (gmt 0)

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Start by thinking about the separation between content and design.

Typically, a member's area is confidential with respect to content, but not design. So you'll want to wall off only the content. Stylesheets, javascript and any images that control the look and feel of the site are design elements (typically). Some images might, of course, be member-only content. Anything that handles design should be shared for two reasons.

1. Maintenance. It's a hassle to keep two versions of the same thing.

2. Performance. You want to hit the browser cache as often as possible for stylesheets and javascript and images.

So I would probably have something like this if the styling is very simple:


But they would be in the same folder and both publicly accessible.

If the site is going to be complex, I would look into something like SMACSS or Object Oriented CSS, breaking things into lots of files and using SASS or LESS to generate a final, compressed CSS file or files.

SMACCS - from Jonathon Snook who has done some of the biggest redesigns around (like Yahoo! mail). [smacss.com...]

OOCSS from Stubbornella (Nicole Sullivan - [github.com...]

Drupal has traditionally had abysmal, bloated markup that is hard to maintain. The Drupal community put together a sort of task force to tackle the issue of how to implement CSS, drawing on the work of Snook, Sullivan and others and have put together an interesting CSS standard for complex projects


I find it a little easier to see put together like that than reading from Snook and Sullivan et al.


4:15 pm on Mar 21, 2014 (gmt 0)

10+ Year Member

Great advice ergophobe. I never thought about that. It would be a good idea to minimize loading the same image twice. That will be in my next clean-up pass. Kudos to you!


5:26 pm on Mar 21, 2014 (gmt 0)

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

No problem!

Featured Threads

Hot Threads This Week

Hot Threads This Month