homepage Welcome to WebmasterWorld Guest from 54.205.254.108
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Content Management
Forum Library, Charter, Moderators: ergophobe

Content Management Forum

    
File structure, and password protection advice
Images, style sheets, and pages
Adam5000




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

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.

 

ergophobe




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

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:

base.css
members.css

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 - https://github.com/stubbornella/oocss/wiki

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

https://drupal.org/node/1887918

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

Adam5000




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

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!

ergophobe




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

No problem!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Content Management
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved