CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 10/21/2006 10:01:17 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 4 Views: 28 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
fischermx
Asp.Net User
Proper way to link to images on a theme directory.10/21/2006 10:01:17 PM

0

I'm creating a website that will support themes. I'm creating the first default theme.

As far as refering to background images on CSS using url('myimage.gif') everything is fine.

But I have some images on the front pages that are simply being linked as images, using <img > 

They look like:

<img alt="rss" src="App_Themes/Default/rss10.gif"/></a> 

But so, now, when someone create and uses another theme, it will not pickup the corresponding images, but it will be always pointing to the default theme.

How do I do to get these images dinamycally pointing to the current theme directory ?

 

fischermx
Asp.Net User
Re: Proper way to link to images on a theme directory.10/22/2006 4:45:42 PM

0

I thought it was an easy question ...
RichMercer
Asp.Net User
Re: Proper way to link to images on a theme directory.10/23/2006 9:15:55 AM

0

This should work for you. I'm sure there's a neater way to return the current theme path but I can't find it. This will do the same thing anyway.

<img alt="rss" src="App_Themes/<%= Theme %>/rss10.gif"/></a>


Rich Mercer
fischermx
Asp.Net User
Re: Proper way to link to images on a theme directory.10/23/2006 2:19:32 PM

0

Thanks !

 

surfer5
Asp.Net User
Re: Proper way to link to images on a theme directory.10/30/2006 10:04:33 PM

0

You could also use the .NET image control on the page rather than img tags.  When you use the .NET controls, you can dictate its behavior in a skin file.  For example, you could have this in your page code:

 

<asp:Image SkinID="image1" ID="Image1" runat="server" /> 
 

In this example, I am setting the image control to have a SkinId property of image1.

In your SKIN file, you can set the attribute of the image control.  For example, you could have the following in your SKIN file:

 

<asp:Image SkinId="image1" runat="server" ImageUrl="images/image1.jpg" /> 
 

You would then need to put the image1.jpg file in the images subdirectory of your Theme.

If you do it this way, you can change the image file for each theme simply by changing the image1.jpg file in the images folder of each theme (you can keep the same reference in the SKIN file).

Does that make sense?

-Jacob






Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages
by Jacob J. Sanford


5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Managing Linux systems with Webmin: system administration and module development Authors: Jamie Cameron, Pages: 792, Published: 2004
Windows Vista administration: the definitive guide Authors: Brian Culp, Pages: 780, Published: 2007
Professional Community Server Authors: Wyatt Preul, Keyvan Nayyeri, Jose Lema, Jim Martin, Pages: 311, Published: 2007
Professional Community Server Themes Authors: Wyatt Preul, Benjamin Tiedt, Pages: 337, Published: 2007
Google Apps Hacks Authors: Philipp Lenssen, Pages: 361, Published: 2008

Web:
Proper way to link to images on a theme directory. - ASP.NET Forums Proper way to link to images on a theme directory. Last post 10-30-2006 6:04 PM by surfer5. 4 replies. Sort Posts: ...
Changelog of the dkret Wordpress Theme Since it's first release the dkret theme has gone a long way. ... BUG: proper redirect link to log-in form; BUG: readded default list-style-type ... child themes (minimal styles for proper display of the top navigation, images etc. ... CHANGED: dkret3 link in footer links to the Wordpress Theme Directory instead of ...
The WordPress.org theme directory sucks Greg-J.com Feb 7, 2009 ... The goal of our themes directory isn’t to have every theme in the world, ... makes a theme for free is so they can benefit from it in another way. ... access to millions of WordPress users who link directly to your site. ...
Path to theme in contemplate | drupal.org What is the correct way to link to images in a custom theme, without hardcoding ... in your theme directory put your contemplate code there. ...
Link Exchange - One Way Link One Way Link. Theme link vs non theme links. Theme link or relevant link is ... and index daily by major search engines) and submit. Search The Directory ...


Videos:
Wordpress Theme on Steroids Wordpress is an easy to use blogging tool. Unfortunately, the base configuration and themes bundled with the software are less than desirable. Now ...
Wordpress Theme on Steroids Wordpress is an easy to use blogging tool. Unfortunately, the base configuration and themes bundled with the software are less than desirable. Now ...
Wordpress Theme on Steroids Wordpress is an easy to use blogging tool. Unfortunately, the base configuration and themes bundled with the software are less than desirable. Now ...
Wordpress Theme on Steroids Wordpress is an easy to use blogging tool. Unfortunately, the base configuration and themes bundled with the software are less than desirable. Now ...
Wordpress Theme on Steroids Wordpress is an easy to use blogging tool. Unfortunately, the base configuration and themes bundled with the software are less than desirable. Now ...












treeview enableclientscript produces invalid javascript

treeview - show node as selected without posting back

dynamic image paths

menu control -selected node

tree view

menu control - default css classes

removing horizontal scroll bar

transparency problem

fileupload control is not working with masterpages

how to display ancestry in a treeview control?

menu skin problem

themes and skins

'asp._masterpage_master' does not contain a definition for 'topmenurepeater_itemcommand'

server control and master page

adding theme to website.

i can't find how to get reference to menu control from its menuitem! :(

menu control aspnet 2.0 image problem

has anyone used themes and skins with master pages?

treeview with showlines has gaps

master pages - using asp files

statichoverstyle-forecolor not working in menu control

anyone have examples on how to pull a treeview from a database

keeping state between response.redirect

question regarding adding nodes to the treeview

sitemappath and self joined table

menu control

help with content on masterpage

menu

nested master pages blues

problem setting textbox color from a skin

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT