I assumethat you have a document type for you frontpage. The wayI usually doit, is by adding a tab on the frontpage document type called Site settings, on the that tab I add a property called of Site logo, so it gets the alias siteLogo. (The datatype is Media Picker) Then I create a XSLT that look like this:
After that I add the macro to my Master template.I assume that the map is also a image, then you can do it like the same way that the logo. Again I have added a property called World map the datatype is (Media Picker) so it gets an alias of worldMap, and added to the Master template too, so it will be printet on all pages.
The dropdown can do make by adding a property on your document type give it a name, and choose the datype of dropdown, see the screenshot, I have added it on the Site setting tab,
After that go to the developer section --> data types find the dropdown datatype, there you can add the pre-values for the dropdown list.
The way you can print the picked value is by using this XSLT.
In the XSLT examples, I always check if the fields have any data, if not I don´t print out the markup. If you have a field on a page the you want to print it can be done by using the $currentPage/propertyAlias. I have linked to the documentation for the XPath Axis: http://our.umbraco.org/wiki/reference/xslt/xpath-axes-and-their-shortcuts
image slider
Hi
I am trying to place image slider for my homepage. Can you please help for writing xslt for image slider..
thanks..
Hi San,
Did you use Umbraco 7, if so you could try using this package: http://our.umbraco.org//projects/website-utilities/sliders
If you use Umbraco 6 or version 4 you could try: http://our.umbraco.org/projects/website-utilities/nivoslider-for-umbraco
/Dennis
Hi Dennis
thanks for your reply. for your reference: http://www.jesperhannibal.dk
when you click on this url i have catalogs i need to place a dropdown button. can you please provide an xslt for this ...
regards san
Hi San,
Just to be sure what you´re trying to do:
You have getting your image slider to work on the site: http://www.jesperhannibal.dk right?
And now you´re tryling to add a dropdown list on the catelog page or where should that be and what content should it hold?
What version of Umbraco are you using?
Loook forward to hear from you, and I will try to help if I can.
/Dennis
Hi Dennis
i am trying to build a site
for your reference: http://w3cyfn.axshare.com/
i am using version 6.
In this i am trying to add dropdown & imagelogo & maps in the middle of my imageslider.
any help ?
thanks
Hi San,
I assume that you have a document type for you frontpage. The way I usually do it, is by adding a tab on the frontpage document type called Site settings, on the that tab I add a property called of Site logo, so it gets the alias siteLogo. (The datatype is Media Picker) Then I create a XSLT that look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:Examine="urn:Examine"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets Examine ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!-- start writing XSLT -->
<xsl:if test="$currentPage/ancestor-or-self::*/siteLogo!=''">
<div id="logo">
<xsl:variable name="media" select="umbraco.library:GetMedia($currentPage/ancestor-or-self::*/siteLogo, 0)" />
<xsl:variable name="alt" select="umbraco.library:GetMedia($currentPage/ancestor-or-self::*/siteLogo, 0)/@nodeName" />
<a href="/">
<img src="{$media/umbracoFile}" alt="{$alt}"/>
</a>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
After that I add the macro to my Master template.I assume that the map is also a image, then you can do it like the same way that the logo. Again I have added a property called World map the datatype is (Media Picker) so it gets an alias of worldMap, and added to the Master template too, so it will be printet on all pages.
The dropdown can do make by adding a property on your document type give it a name, and choose the datype of dropdown, see the screenshot, I have added it on the Site setting tab,
After that go to the developer section --> data types find the dropdown datatype, there you can add the pre-values for the dropdown list.
The way you can print the picked value is by using this XSLT.
In the XSLT examples, I always check if the fields have any data, if not I don´t print out the markup. If you have a field on a page the you want to print it can be done by using the $currentPage/propertyAlias. I have linked to the documentation for the XPath Axis: http://our.umbraco.org/wiki/reference/xslt/xpath-axes-and-their-shortcuts
I hope this helps, and make sense.
/Dennis
Hi Dennis
Many thanks for your reply. i will try the XSLT file which you gave ..if any problem i will get back to you. thank you
is working on a reply...