So you just want to put in more space between the "Weatherdeck:" and the numbers, right?
You should be able to do this in several ways. either you could insert some between the two bocks, this would cause some empty space. Otherwise you can insert some spaces by using something like this:
<xsl:text></xsl:text>
You could also put the two blocks into two seperate span-tags, and then put some margin on one of the two span's.
You can try out the table-method that Sebastiaan suggested (I actually thought of this as well, but I don't like tables when it's just one row :D ), or else you should try out the span-tag solution I mentioned in my first post.
Just by putting the two blocks into span-tags like this:
You need to put some margin on one of the span-tags (and maybe some float:left on the span's as well). I'm not sure if you can use an external stylesheet for this, but otherwise you should be able to put on some inline syling like you did on your fo:block.
As Kim is saying you need to add a margin to one of the span elements. Try for instance writing this: <span style="margin-right:20px">Weatherdeck</span>
If this was rendered as normal html, then it would work. But I'm not quite sure if the transformation from XSLT to pdf, strips the html-tags and everything in it, as it looks like that, when you say that the $currentPage/weatherdeck is not rendered.
Didn't know that you needed to build the code like that to make it work when you transformed it into a PDF-file. May I ask how you convert it to a PDF? You use a umbraco PDF creator package or a third party service or how do you do it? I'm just curious ;)
Its late. So dont mind. Yeh, its work fine. I have got the idea from w3schools.com and also used a pdf creator package .But i think the package is not complete for work.
kim im not expert in umbraco, just learning and trying to learn much.
Kim, im in another problem. The problem is like as , follow the link:
Touhid, the way that such a dropdown could work would be to get the parameters from the URL, and then use those params as a filter of what to show on the page.
If you just want to filter by year, then you probably only need one parameter in the URL. Eg. the URL could look something like this: domain.com/some-page.aspx?year=2005. Then in your XSLT(or .NET - whatever you preffer) you would grab the year-parameter and use this as the filter. Does it make sense?
Now $year will have the value of the year-parameter, and then you can use this to filter your result using either a <xsl:choose>, <xsl:apply-templates> or whateve you preffer.
When you change the value in the dropdown have you gotten the correct year-value in your url?
problem to work with pdf
Hi
I have used the following code:
<fo:block width="320px" float="left" margin-top="0px">
- Weatherdeck:<xsl:value-of select="$currentPage/ weatherdeck"/>
</fo:block>
Here, weatherdeck is page field. and output is-
- Weatherdeck:70,90 x 17,30 m70,90
But i want that it will show following format:
- Weatherdeck: 70,90 x 17,30 m70,90
just need to a specific gap. pls any body help me.
Touhid
Hi Touhid
So you just want to put in more space between the "Weatherdeck:" and the numbers, right?
You should be able to do this in several ways. either you could insert some between the two bocks, this would cause some empty space. Otherwise you can insert some spaces by using something like this:
You could also put the two blocks into two seperate span-tags, and then put some margin on one of the two span's.
I hope that's what you are looking for.
/Kim A
Hi kim
thnks for reply. i need to specific empty space. like 20px or 2.3 cm . how can do this?
Touhid
Not sure how it would work with the pdf creator, but how about just using a good old <table> to do this?
You can try out the table-method that Sebastiaan suggested (I actually thought of this as well, but I don't like tables when it's just one row :D ), or else you should try out the span-tag solution I mentioned in my first post.
Just by putting the two blocks into span-tags like this:
Then you should be able to give one of the span's a margin of 20 px.
/Kim A
I put them but it doesnt work:
<fo:block width="320px" float="left" margin-top="0px">
<span>- Weatherdeck:</span>
<span><xsl:value-of select="$currentPage/ weatherdeck"/></span>
</fo:block>
Touhid
You need to put some margin on one of the span-tags (and maybe some float:left on the span's as well). I'm not sure if you can use an external stylesheet for this, but otherwise you should be able to put on some inline syling like you did on your fo:block.
/Kim A
Hi Touhid
As Kim is saying you need to add a margin to one of the span elements. Try for instance writing this: <span style="margin-right:20px">Weatherdeck</span>
/Jan
Hi
thnks. i put this but it shows only: -Weatherdeck
<fo:block width="320px" float="left" margin-top="0px">
-Weatherdeck
<span style="margin-left:20px"><xsl:value-of select="$currentPage/ weatherdeck"/></span>
</fo:block>
Note: This code i used in pdf creator.
Touhid
Hmm....I'm not sure if the creation of the pdf, strips the html-tags that we are inserting.
But in the code that you provided above, could you try changing that to:
If this was rendered as normal html, then it would work. But I'm not quite sure if the transformation from XSLT to pdf, strips the html-tags and everything in it, as it looks like that, when you say that the $currentPage/weatherdeck is not rendered.
/Kim A
HI kim
Sory, that doesnt work and thnks you for reply me manytimes. but i have done this using following this code:
<fo:block width="320px" float="left" margin-top="0px">
<fo:list-block>
<fo:list-item>
<fo:list-item-label>
<fo:block>-Weatherdeck</fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block margin-left="150px"><xsl:value-of select="$currentPage/ weatherdeck"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:block>
Touhid
Ahh great, so you actually made it work now?
Didn't know that you needed to build the code like that to make it work when you transformed it into a PDF-file. May I ask how you convert it to a PDF? You use a umbraco PDF creator package or a third party service or how do you do it? I'm just curious ;)
/Kim A
Hi Kim
Its late. So dont mind. Yeh, its work fine. I have got the idea from w3schools.com and also used a pdf creator package .But i think the package is not complete for work.
kim im not expert in umbraco, just learning and trying to learn much.
Kim, im in another problem. The problem is like as , follow the link:
http://www.scan-trans.com/history.aspx?STCNAV_ID=44&SUBSTCNAV_ID=11&bcrumb1=HOME&bcrumb2=ABOUT+US&bcrumb3=HISTORY
Here is a dropdown, the dropdown contains some year and when a year is selected the corresponding content is show. So how can do this??
Have you any idea ?
Touhid
Touhid, the way that such a dropdown could work would be to get the parameters from the URL, and then use those params as a filter of what to show on the page.
If you just want to filter by year, then you probably only need one parameter in the URL. Eg. the URL could look something like this: domain.com/some-page.aspx?year=2005. Then in your XSLT(or .NET - whatever you preffer) you would grab the year-parameter and use this as the filter. Does it make sense?
/Kim A
Hi Kim
Thnks for give me the idea. The dropdown, which contain the years, is it in this way in xslt file:
<option selected="selected" value="- Select a Year -">- Select a Year -</option>
<option value="1975">1975</option>
<option value="1995">1995</option>
<option value="1996">1996</option>
<option value="1997">1997</option>
<option value="1998">1998</option>
<option value="1999">1999</option>
<option value="2000">2000</option>
Can you help me by give xslt code ?
Touhid
First of all you need to grab the value of the year-parameter. You can do this by using this small piece of code:
Now $year will have the value of the year-parameter, and then you can use this to filter your result using either a <xsl:choose>, <xsl:apply-templates> or whateve you preffer.
When you change the value in the dropdown have you gotten the correct year-value in your url?
/Kim A
Hi Kim
Thnks. Its a good idea. Im doing that.
Touhid
Great. If you have further questions just ask and we'll fint a solution...
/Kim A
is working on a reply...