473,796 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Repost: Themes, stylesheets and rewrites

Hi

I posted this q last week, Stefano had an answer but unfortunately it would
only work if I was specifying the stylesheet reference directly; in this case
it is the ASP.NET 2 theme process that inserts a relative stylesheet
reference, which is no good if my client thinks everything is coming from the
original URL, not the rewritten one.

Anybody got any clues?

Ta

Graham

"Graham" wrote:
Hi there

Yes that would be the solution but the stylesheet reference is inserted
directly by the Theming process & I have no opportunity to specify it as a
root reference or otherwise! Unless I'm going completely mad, that is, but
thank you for the suggestion.

Anybody got any ideas how to hook into the theme process?

Cheers again!!

"Stefano" wrote:
Hi,

I think the only way to solve this problem is to put the reference to the
css as absolute url:
"/Themes/me.com/stylesheet.css"

When you insert a "/" as the first character, the browser always points to
the root of the site.

HTH

Bye,
Stefano

"Graham" <Gr****@discuss ions.microsoft. com> ha scritto nel messaggio
news:92******** *************** ***********@mic rosoft.com...
I have a problem that I can see the reason for but cannot figure out a
solution.

I am using a simple URL rewriter to map www.me.com/1/2/3/4/product.aspx to
www.me.com/product?filter=1/2/3/4 to make my site Google-friendly. The

site
dynamically adopts the correct master pages and themes according to a host
header-based query in SQL 2005 and via a custom sqlsitemapdatas ource
automagically configures a breadcrumb and menus, all of which work
wonderfully.
However the theme's stylesheet is always declared in the page as a

relative
reference (e.g. "Themes/me.com/stylesheet.css" ) which means that for the
rewritten rule the browser client will be looking for
"www.me.com/1/2/3/4/Themes/me.com/stylesheet.css" . Does anybody have a

way
of specifying that this be output as a url relative to root
("~/blah/blah/...") as I don't want to have to do a replace on render

because
of the hit per page that would incur.

Ta!!


Nov 19 '05 #1
0 981

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2166
by: John Ortt | last post by:
I appologise for reposting this but I have been trying to find a solution all week with no avail and I was hoping a repost might help somebody more knowledgable than myself to spot the message... I am trying to write a webpage in Javascript. The page loads with three frames, a top, left and right frame. Depending on the users actions the background page rewrites the code for the relevant frames.
0
1496
by: Full Decent | last post by:
Hey again! In my quest to make proper use of OO PHP I would like to ask for a critique of the current method of doing themes in the Camera Life (http://fdcl.sf.net) software and see if an OO approach is more appropriate. This program consists of multiple PHP pages that include a common.php file. My motivation is to make making themes easier, so we can get more theme contributors! Themes consist of image files, a css file and a PHP...
1
1278
by: Jay | last post by:
Background I realize I can make a theme global by putting it in a special directory. If I include sytlesheets in the global theme folder I am assuming I can refence them in my other global theme elements - skins, etc. Question Is there a way I can make a style sheet global so that all global themes can reference that stylesheet and along with server controls directly.
3
1513
by: Markus Rytterkull | last post by:
I'm porting an application from asp to asp.net2.0 and thought this would be a good time to test masterpages and themes. The end result is fine but I find it difficult to recreate forms in designmode since the pages gets very cluttered (controls on top of each other, stylesheet from theme not applied). The forms use both layers with absolute positioning and styles (from stylesheet in themes). Does everybody have the same problems with...
0
874
by: Manso | last post by:
Hi, We are trying to figure out a nice way to support themes both IE and Firefox. What's the best practise here? We normally have two different stylesheets that are injected based on the browser type but we can't figure out how to apply this when working with themes. Are people duplicating the themes creating one for each browser? Thanks, Manso
1
1934
by: rshillington | last post by:
just poking around with how themes work, and it looks like all the CSS files in a given theme are linked into the head sections of pages that reference the given theme. That's fine, but how do you control the order of the loading of the CSS. It appears that they are loaded in alphabetical order, but i'm not seeing there that is so described in the documentation. Suggestions, Ralph Shillington
4
1685
by: Sean | last post by:
My experience now working with master pages on and off for 6 months is that they can be very dangerous when working with themes. One example in particular is the changes I made to my banner menu which now work just fine with all my themes on my development machine but on my production server my non-standard themes are showing effects that are no longer in place even with a complete re-copy of my project. Problems like this with...
6
2495
by: Clinton Farleigh | last post by:
Hi, I was going to ask a question, but I think I've answered it so now I am going to rant about how crappy ASP.NET themes are instead. As I've indicated above, my problem today is with themes. Per microsoft "Only one theme can be applied to each page. You cannot apply multiple themes to a page, unlike style sheets where multiple style sheets can be applied."
3
2572
by: WT | last post by:
Hello, I need to list all available themes for a .NET app, is there any API in ..NET2 for this or should I explore the folder files using IO methods ? Thanks for indication CS
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10461
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10190
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9057
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7555
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6796
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4122
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.