iam new to umbraco, i get started with CWS, it is worked very nice, iam able to modify the site as i need(editing name,font,uploading files...). it is fine. But the problem is i have one site, iam
trying to develope that in umbraco.The site consists of images means the text AboutUs is an image & Logo text is an image like this. I am not able to render those images .
This is my XSLT file(Main or master Template), from this iam creating child templates..
but iam not able to see the content.
what i hav to do read images & wherei have to store the images(images/AboutUs.jpg).
shall i store them in Media section. if so how can i read from that..
you can access any files directly from the website file folder in Umbraco as in any other html file, so if you add images to "/images" folder you can reference then like that also.
However using the Media folder would be a good idea, as you can attach additional info, and easily maintain and change them.
Referencing media files in XSLT is done using umbraco library functions available from the Umbraco Library extension. Specifically you could use
[code]umbraco.library:GetMedia[/code]
to fetch the data. What data to fetch is easily specified my adding a media picker argument (mediaCurrent) to your macro, and use this value in you GetMedia call.
Thanks for ur reply, So i have to create one XSLT file for reading images from media and then macro calling this XSLT file and later use this Macro in my main Template, Is it Right? Ok but another problem is did i correctly call style sheet in my code or not?, because it is not showing any thing. I think it will show atleast some part with out these images, why it didn't show anything. how can i apply stylesheet(syntax) in template and please tel me how to read header images , text images(means all the 60% of site contains images ie..company name, navigation text,headers etc.,) all these are written as:
.........................
...............
......................
.......................
how can i change this original template in umbraco.This template will be used as a master template and what i have to do to view the site.
Please let me whether u get my question...........................
Hi,
iam placing all the images in media section(library) ,I checked up the site and iam able to modify the CWS site.
but the problem occurs when iam trying to create my site from scratch. questions occurs at,..how to create XSLT file and Macros from scratch? using this macro in Main Temlplate? whether i have to create one macro for reading every image or
have to create macro for each image?how to make display my site by taking stylesheet and html source and the work i have to do with this raw material(stylesheet,source of my site). Is there any clear video description that solves my problem.
Plz let me know it is urgent to me..................
Reading images from Media section
Hi all,
iam new to umbraco, i get started with CWS, it is worked very nice, iam able to modify the site as i need(editing name,font,uploading files...). it is fine. But the problem is i have one site, iam
trying to develope that in umbraco.The site consists of images means the text AboutUs is an image & Logo text is an image like this. I am not able to render those images .
This is my XSLT file(Main or master Template), from this iam creating child templates..
but iam not able to see the content.
what i hav to do read images & wherei have to store the images(images/AboutUs.jpg).
shall i store them in Media section. if so how can i read from that..
<%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
.............
...............................................
Hi
you can access any files directly from the website file folder in Umbraco as in any other html file, so if you add images to "/images" folder you can reference then like that also.
However using the Media folder would be a good idea, as you can attach additional info, and easily maintain and change them.
Referencing media files in XSLT is done using umbraco library functions available from the Umbraco Library extension. Specifically you could use
[code]umbraco.library:GetMedia[/code]
to fetch the data. What data to fetch is easily specified my adding a media picker argument (mediaCurrent) to your macro, and use this value in you GetMedia call.
See this url for an example:
http://www.blackpoint.dk/umbraco-workbench.aspx?Snippet=/umbraco-workbench/xslt/accessing-media-files.aspx
Hi tommy,
Thanks for ur reply, So i have to create one XSLT file for reading images from media and then macro calling this XSLT file and later use this Macro in my main Template, Is it Right? Ok but another problem is did i correctly call style sheet in my code or not?, because it is not showing any thing. I think it will show atleast some part with out these images, why it didn't show anything. how can i apply stylesheet(syntax) in template and please tel me how to read header images , text images(means all the 60% of site contains images ie..company name, navigation text,headers etc.,) all these are written as:
.........................
...............
......................
.......................
how can i change this original template in umbraco.This template will be used as a master template and what i have to do to view the site.
Please let me whether u get my question...........................
Hmm, where did you put your AboutUs.jpg image - in the media library or as a file somewhere?
Regarding customizing the CWS you should check out Warrens extensive documentation here
CWS also contains stylesheets, so you should take a look at them also.
Your approach with xslt, macro and template is spot on.
Hi,
iam placing all the images in media section(library) ,I checked up the site and iam able to modify the CWS site.
but the problem occurs when iam trying to create my site from scratch. questions occurs at,..how to create XSLT file and Macros from scratch? using this macro in Main Temlplate? whether i have to create one macro for reading every image or
have to create macro for each image?how to make display my site by taking stylesheet and html source and the work i have to do with this raw material(stylesheet,source of my site). Is there any clear video description that solves my problem.
Plz let me know it is urgent to me..................
check out
http://umbraco.org/documentation/videos/getting-started/what-is-umbraco
Getting started with umbraco v4
is working on a reply...