Forums
This topic is locked
Dynamic Style Sheets
Posted 10 Jun 2005 12:32:29
1
has voted
10 Jun 2005 12:32:29 Noel Fraser posted:
Can anyone tell me if its possible to dynamically attach a style sheet from a MySql database so that I can present my users with a different page layout depending upon their login?I'm using Dreamweaver and when I go to attach a style sheet there is the option to choose the file from a recordset but I've never managed to get it working yet so wondered if anyone else has?
Kind regards
Noel Fraser
Noel Fraser
Discreet AV Ltd
Replies
Replied 29 Jun 2005 15:15:05
29 Jun 2005 15:15:05 Simon Bloodworth replied:
Hi
Have done something similar awhile ago.
I had a database that held the link to the different style sheets.
I then adjusted the css link on the page
so
<link rel="stylesheet" href="/styles/style.css" />
would become somthing like
<link rel="stylesheet" href="<%=(Recordset1.Fields.Item("ID_Style".Value)%>" />
Then set the style database to return the record dependent on the user logged in.
hope this helps
regards
Simon
DWMX 2004 | ASP | VBScript
Have done something similar awhile ago.
I had a database that held the link to the different style sheets.
I then adjusted the css link on the page
so
<link rel="stylesheet" href="/styles/style.css" />
would become somthing like
<link rel="stylesheet" href="<%=(Recordset1.Fields.Item("ID_Style".Value)%>" />
Then set the style database to return the record dependent on the user logged in.
hope this helps
regards
Simon
DWMX 2004 | ASP | VBScript