Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nick Portelli 76 posts 102 karma points
    Feb 13, 2011 @ 22:16
    Nick Portelli
    0

    4.6.1 business starter kit umedia slider issues

    I installed the umedia skin for the business starter kit, I edited the images and text of the sliders and saved.  Nothing happened.  Finally looked in the template for the site and the images and text are hardcoded in there, ie not using the macro.  I changed the slider to use the macro on the homepage and it worked....but I also wanted it on the blog like in the original template.  I insert the macro but nothing shows up.  Is the xslt and macro constructed to only work on the template homepage?  Can I get it to show in childpages?

  • Nick Portelli 76 posts 102 karma points
    Feb 18, 2011 @ 16:02
    Nick Portelli
    0

    Hmm no one?  Guess I need to refresh my XSL and see why it's not working on a child page.  

     

    Where are these starter kit skins downloaded from?  

  • Kim Andersen 1447 posts 2196 karma points MVP
    Feb 20, 2011 @ 12:51
    Kim Andersen
    0

    Hi Nick.

    Could you provide us with the code from the XSLT macro you have inserted. Maybe we can see what's going on then :)

    /Kim A

  • Nick Portelli 76 posts 102 karma points
    Feb 20, 2011 @ 15:58
    Nick Portelli
    0

    Ah good point, I didn't think of it since it was in the skin already, not custom. 

     

    <xsl:variable name="sliderNode" select="$currentPage/parent::*/child::*[@level=1]"/>

     <div id="slider">
        <div id="imageSlider">
          <xsl:for-each select="$sliderNode/child::umediaSlider">
               <div class="imageSlide">
                  <div class="imageSliderInfo">
                      <h2> <xsl:value-of select="@nodeName"/></h2>
                      <xsl:value-of select="teaserText" disable-output-escaping="yes"/>
                    </div>
                    <div class="imageSliderImage">
                      <img src="{umbracoFile}" width="500" height="320" />
                    </div>
                </div>
           
          </xsl:for-each>
       </div>
    </div>
  • Kim Andersen 1447 posts 2196 karma points MVP
    Feb 20, 2011 @ 16:34
    Kim Andersen
    0

    Hmm...okay.

    I haven't seen the sructure in the content tree, but I guess that there are some nodes under the homepage-node with a document type of umediaSlider.

    If that's correct, I think you can just chage the variable to this:

    <xsl:variable name="sliderNode" select="$currentPage/ancestor-or-self::*[@level=1]"/>

    Does that make any difference.

    /Kim A

     

  • Nick Portelli 76 posts 102 karma points
    Feb 20, 2011 @ 19:12
    Nick Portelli
    0

    No that didn't work.  broke for both.

     

    It's the straight vanilla Business site quick install that comes with 4.6.1.  I was surprised to find out the templates didn't actually use the macros's but had the html hard codeded in them.  The uslider node doesn't sit under the homepage node, but on the same level on the level under the content node.  Looks like the template the macro doesn't work on is under the one it does...So I think you pointed me in the right direction.  Like I said I'll have to refresh my xslt skills.  My guess is it is not going far enough up the tree.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Feb 20, 2011 @ 20:37
    Kim Andersen
    0

    Ahh okay, if the umediaSlider-nodes are on the same level as the homepage try this instead:

    <xsl:variable name="sliderNode" select="$currentPage/ancestor-or-self::root/*[@nodeName = 'uslider']"/>

    But please make sure that the nodes that are used, has a document type with an alias of umediaSlider, as this is the alias that's used in the xpath. And that the uslider-container is called "uslider". If it still doesn't work, can you show is the structure of the content section.

    /Kim A

  • Nick Portelli 76 posts 102 karma points
    Feb 21, 2011 @ 05:44
    Nick Portelli
    0

    Awesome that last one worked. except i had to change inside the brackets back to @level=1.  I need to learn XSLT...Again.

  • tarekahf 215 posts 153 karma points
    Mar 01, 2011 @ 00:03
    tarekahf
    0

    I'm glad I found this post, becuase I faced the same issue here.

    So looks like we have to change the slider setting from Static to Dynamic, ok, it is a chance to learn new XSLT.

    There is something really puzling me !!!!

    I read almost everywhere about using displaying images using img tag, and all the reference I found they request the use of XSL Umbraco Extension GetMedia() or something like that.

    But, I am surprized to find out that in the above example, curly braces are used to specify the value of the image src using umbracoFile property

                    <div class="imageSliderImage">
                      <img src="{umbracoFile}" width="500" height="320" />
                    </div>

    Is this a new feature in Umbraco 4.6.1 ?

    Tarek

  • Kim Andersen 1447 posts 2196 karma points MVP
    Mar 01, 2011 @ 07:59
    Kim Andersen
    0

    Hi tarek

    You onlu need to use the GetMedia extension if you are grabbing the image from a media picker. I don't know which data type are used in this starter kit, but I gues it's an upload field with an alias of umbracoFile maybe?

    /Kim A

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 01, 2011 @ 08:07
    Jan Skovgaard
    0

    Hi Tarek

    The curly braces stuff is not something that is feature specific to Umbraco. It's a XSLT feature, which has always been there :)

    If you're are in fact using the media section to store your images then have a look at this wiki entry about how to use the GetMedia extension: http://our.umbraco.org/wiki/reference/umbracolibrary/getmedia

    Hope this helps.

    /Jan

  • tarekahf 215 posts 153 karma points
    Mar 01, 2011 @ 09:11
    tarekahf
    0

    Thanks all for the reply.

    I see the difference now. Media Picker and Upload Field and different.

    But, I could not find any reference to the use of curly braces in any wiki or reference site. I found it by chance posted several years ago by D. Robar in the old Umbraco Forums. Looks like this is one of the "minor" undocumented features of Umbraco XSLT.

    Is there a complete reference to XSLT implementation in Umbraco ?

    Also, where I can get general reference to XSLT XPath. For example, I want to know the difference between :

    <xsl:variable name="sliderNode" select="$currentPage/ancestor-or-self::root/umediaSliders"/>

    and

    <xsl:variable name="sliderNode" select="$currentPage/ancestor-or-self/umediaSliders"/>

    Where I can find good reference for XSLT ?

    Tarek.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Mar 01, 2011 @ 10:36
    Kim Andersen
    0

    Hi Tarek

    Try taking a look at this page: http://our.umbraco.org/wiki/reference/xslt

    The menu on your right hand have got links to some great examples and descriptions on how to use XSLT in Umbraco.

    /Kim A

  • tarekahf 215 posts 153 karma points
    Mar 11, 2011 @ 00:05
    tarekahf
    0

    I find this code in CSS Custom.css:

    /* EDITOR PROPERTIES - PLEASE DON'T DELETE THIS LINE TO AVOID DUPLICATE PROPERTIES */
    body{ background-color:#333440;}
    .newsbox .feedList h4 a, #sitedescription h1, a{ color:#ec008c;}
    .primary-bgcolor, a.ui-btn-big, .newsbox .feedList h4 a:hover, #slider #imageSliderNav a.activeSlide{ background-color:#ec008c;}
    #header #mainmenu ul, #header #mainmenu ul li{ background-color:#22212C;}
    #header #mainmenu ul li.home a{ color:#22212C;}
    body{ background-color:#333440;}
    .newsbox .feedList h4 a, #sitedescription h1, a{ color:#ec008c;}
    .primary-bgcolor, a.ui-btn-big, .newsbox .feedList h4 a:hover, #slider #imageSliderNav a.activeSlide{ background-color:#ec008c;}
    #header #mainmenu ul, #header #mainmenu ul li{ background-color:#22212C;}
    #header #mainmenu ul li.home a{ color:#22212C;}

    But, I don't know how to reach this code to edit it from Umbraco back-office.

    There is a bug where I must chage this line:

    #header #mainmenu ul li.home a{ color:#22212C;}

    To:

    #header #mainmenu ul li.home a{ color:#ffffff;}

    The above bug is causing the color of the "Home" navigation text to be black when you navigate to another page, which makes the home menu disapear.

    How I can change it from Umbraco ?

    Note: I am using FireFox 3.6 for now.

  • Nick Portelli 76 posts 102 karma points
    Mar 11, 2011 @ 03:59
    Nick Portelli
    1

    Hmm I'm sure I posted this...

     

    In backoffice got to Settings->StyleSheet.  You should see custom.css under there.  Now to get the home icon to show when the button is not focused.

     

    Thanks Good catch.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Mar 11, 2011 @ 07:32
    Kim Andersen
    0

    Hi Tarek

    Like Nick says, you can go to the settings-section and fold out the Stylesheet folder. In here you can create all the stylesheets you want. And there might already be someone in that folder.

    The stylesheets that's found in the Stylesheet-folder inside Umbraco is stored in the /css-folder in the file system, so you can actually change them both inside Umbraco or from the file system in yout favorit editor like Visual Studio, TextMate, Notepad++ etc.

    /Kim A

  • tarekahf 215 posts 153 karma points
    Mar 11, 2011 @ 16:56
    tarekahf
    0

    Thanks - Nick and Kim.

    I know how to modify CSS from Umbraco and also from Notepad.

    My question was: I am unable to access the above CSS from Umbraco/Settings/CSS Folder.

    Aparently, the CSS file "custom.css" has some problems.

    When I created a new CSS entry (right-click) under custom.css, the following code was removed by Umbraco:

    /* EDITOR PROPERTIES - PLEASE DON'T DELETE THIS LINE TO AVOID DUPLICATE PROPERTIES */
    body
    { background-color:#333440;}
    .newsbox .feedList h4 a, #sitedescription h1, a{ color:#ec008c;}
    .primary-bgcolor, a.ui-btn-big, .newsbox .feedList h4 a:hover, #slider #imageSliderNav a.activeSlide{ background-color:#ec008c;}
    #header #mainmenu ul, #header #mainmenu ul li{ background-color:#22212C;}
    #header #mainmenu ul li.home a{ color:#22212C;}
    body
    { background-color:#333440;}
    .newsbox .feedList h4 a, #sitedescription h1, a{ color:#ec008c;}
    .primary-bgcolor, a.ui-btn-big, .newsbox .feedList h4 a:hover, #slider #imageSliderNav a.activeSlide{ background-color:#ec008c;}
    #header #mainmenu ul, #header #mainmenu ul li{ background-color:#22212C;}
    #header #mainmenu ul li.home a{ color:#22212C;}

    Oh ! Good that I got copy of it in this forum post. Mybe it is required by the starter kit.

    The question know is:

    1. Why the above code was in CSS file custom.css but could not reach it from Umbraco?

    2. Why it was deleted when I create a sub CSS definition from Umbraco back-office ?

    3. Is this CSS code required by this Business Starter Kit ?

    Tarek.

  • Nick Portelli 76 posts 102 karma points
    Mar 11, 2011 @ 17:40
    Nick Portelli
    0

    I see the above code...but it is formated differently and there are no comments in the Umbraco editor.  

  • tarekahf 215 posts 153 karma points
    Mar 11, 2011 @ 21:16
    tarekahf
    0

    Nick,

    Aparently, the version you have of the BSK, CSS custom.css, is different than mine.

    I am just reporting what I find when working with BSK.

    Tarek.

  • Nick Portelli 76 posts 102 karma points
    Mar 11, 2011 @ 21:30
    Nick Portelli
    0

    That could very well be.

     

    Kim where are the starter kits located?  Can I go get the templates and what not from the Codeplex Repository somewhere?  I've looked unsuccessfully, but only using the online brower.

  • tarekahf 215 posts 153 karma points
    Mar 11, 2011 @ 22:34
    tarekahf
    0

    I installed the BSK using a fresh install of new Umbraco 4.6.1 and I chose the Business Starter kit during the install process.

    I did not install BSK with the fresh separate download of BSK.

    I am preparing for a POC requested by our IT Director and I am trying to be ready for all possible cases which might cause troubles. So, I need to understand what is going on?!?!

    Tarek

  • Nick Portelli 76 posts 102 karma points
    Mar 11, 2011 @ 22:59
    Nick Portelli
    0

    Yes I installed that one too.  It seems half finished.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Mar 12, 2011 @ 14:45
    Kim Andersen
    0

    Hi Nick

    I'm actually not sure if you can download the four different starter kits when you are not in the process of installing a new instance of Umbraco. But if you really need it, you can of course install a new Umbraco site, and choose the starter kit that you want, to check out the different files.

    /Kim A

  • Anthony Candaele 1197 posts 2049 karma points
    Mar 27, 2011 @ 12:33
    Anthony Candaele
    0

    Hi,

    I am also using the umedia skin of the Business Starter Kit in Umbraco 4.7

    The umediaSlider was working, but then I wanted the umediaslider not on level 1 but under my homepage, because I'm planning for a multilanguage website (see screenshot, the document node using the umediaSlider is called Frontpage Sliders)

    I adjusted the u.umediaslderimages.xslt to this new structure and changed the code for the sliderNode variable:

    <xsl:variable name="sliderNode" select="$currentPage/ancestor-or-self::*[@nodeName= 'umediaSliders']"/>

    But apparently this doesn't work. Not only do my sliderimages not appear, but the slider is now not only on the homepage - as it used to be - but one EVERY page under the homepage! This is something I don't understand, as I didn't make changes to the templates.

    Is anybody seeing what am I doing wrong?

    Thanks for your help,

    Anthony Candaele
    Belgium


  • Anthony Candaele 1197 posts 2049 karma points
    Mar 27, 2011 @ 20:46
    Anthony Candaele
    0

    I solved my problem by changing the code for the sliderNode variable to this:

    <xsl:variable name="sliderNode" select="$currentPage/child::umediaSliders"/>

    The problem with the slider appearing on every page was a false alarm. Because I moved the document node Frontpage Sliders under the Homepage document node, it appeared in the navigation menu. So just by adding a Hide from navigation property to the umediaSliders document type solved this problem too.


    good night,

    Anthony

  • Draggor 1 post 21 karma points
    Aug 04, 2011 @ 05:05
    Draggor
    0

    Can anyone give me the xsl code to get these sliders to work? I tried all the examples in these three pages with no luck.

     

    Or else can someone tell me how to create and test xpath queries against Umbraco? It's like fumbling around in the dark.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Aug 04, 2011 @ 10:12
    Jan Skovgaard
    0

    Hi Draggor and welcome to the forum :)

    In order to figure out what the XML you're trying to target looks like you can go to the App_Data folder and open the umbraco.config file to see the XML structure. (Do not make changes in this file! Only look at it).

    Then it should be more clear how things are structured and how you should write your xpath queries against it.

    Hope this helps.

    /Jan

  • Roberto Figueroa 2 posts 22 karma points
    Dec 05, 2011 @ 05:38
    Roberto Figueroa
    0

    Hi all, I'm new to umbraco (and to xsl also),  I've installed the Simply Starter Kit and also trying to get the sliders to work.

    I've looked umbraco.config as Jan suggested and more or less this is the structure:

    <root id="-1">
      <umbHomepage ...>
        ...
      </umbHomepage>
      <umediaSliders ...>
        <umediaSlider ...
        <umediaSlider ...
    <umediaSlider ...
    <umediaSlider ... </umediaSliders> </root>

    So how should I construct the xpath?

    Thanks in advance...

    Roberto.

     

  • Kim Andersen 1447 posts 2196 karma points MVP
    Dec 05, 2011 @ 21:18
    Kim Andersen
    0

    Hi Roberto. Do you have some code already that we might have a look at?

    If you are just looking for the xpath in the variable could you maybe try this out to seeif that works:

    <xsl:variablename="sliderNode"select="$currentPage/ancestor-or-self::root/umediaSliders"/>

    What the code does is taking the current node, going up to the root-node, and then going one level down to an element called umediaSliders.

    /Kim A

  • Nick Portelli 76 posts 102 karma points
    Dec 06, 2011 @ 01:56
    Nick Portelli
    0

    Ya, mine is close to that:

    <xsl:variable name="sliderNode" select="$currentPage/ancestor-or-self::root/*[@level=1]"/>

    My xsl is rusty, so I don't know what exactly the difference is.  But it works on my site, if the slider content is on the same level as the website content.

  • tarekahf 215 posts 153 karma points
    Dec 06, 2011 @ 05:30
    tarekahf
    0

    Hi all...

    I understand that razor new syntax can replace xslt so why not convert the whole thing to razor version and put an end for the suffering with xslt. I hope my sugestion is relevant though.

    Tarek

  • Roberto Figueroa 2 posts 22 karma points
    Dec 06, 2011 @ 18:13
    Roberto Figueroa
    0

    Thank you, 

    The problem was the sliders were hardcoded on the homepage template, so I just replace them with the umediaSliders macro. And that's it.

    So, there was no need to change any xslt code... ;-)

    Thank you again.

    Roberto

     

  • Kim Andersen 1447 posts 2196 karma points MVP
    Dec 06, 2011 @ 22:19
    Kim Andersen
    0

    Great to hear that you got things working Roberto :)

    /Kim A

  • Bill Lugaila 11 posts 31 karma points
    Dec 13, 2011 @ 21:06
    Bill Lugaila
    0

    I am new too, so what are all the steps needed to get the sliders to work?

  • Kim Andersen 1447 posts 2196 karma points MVP
    Dec 13, 2011 @ 21:20
    Kim Andersen
    0

    Hi Bill, and welcome to the post :)

    First of all you need to have a macro, that points to a XSLT-file. Then you need to replace the static content that renders the slider, with the macro.

    In the XSLT-file you need to have some code that looks pretty similar as the code shown on page 1 of this thread. When these steps are done you can be lucky that it just works, but I guess that we have to make some small changes.

    Try going through the steps I just provided, and then maybe return in hereto tell us how far that get's you.

    /Kim A

  • Nick Portelli 76 posts 102 karma points
    Dec 13, 2011 @ 21:55
    Nick Portelli
    0

    What Kim said.  The default template the slider is hardcoded in the template.  It's not using the macro template.  I make a package for myself....I think.  I know I had some other issues because I changed the templates around a little.  

     

    Does anyone know where it get's the starter packages so we can fix them?

     

  • Zed Dhalla 2 posts 22 karma points
    Oct 31, 2012 @ 19:53
    Zed Dhalla
    0

    I have read through this thread. Unfortunately I am a complete beginner and can not figure it out. 

     

    I went to settings/templates/starterkit master/business homepage to look at the code that apparently am supposed to change to be able to change the images in the frontpage sliders. 

     

    The following is the code. Please tell me what exactly I need to change for what lines. Thank you so much for helping!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 01, 2012 @ 21:26
    Jan Skovgaard
    0

    Hi Zed and welcome to our :)

    So if I get your question correct you need to figure out what to change in the code above in order to be able to change the images.

    In each of the <div>'s with the class "imageSliderInfo" there is an <img> tag. The value of the "src" attribute contains the path to the images. If you want to change the image displayed you can change this path to point to the image you want to have displayed instead.

    So in each of the <img> tags you can change the src value like <img src="/images/mynewimage1.jpg" width="500" height="320" />.

    Hope this makes sense and that I got your question correctly :)

    /Jan

  • ... 20 posts 41 karma points
    Aug 21, 2013 @ 16:48
    ...
    0

    So, going by the details in this thread, am I correct in thinking that the 'fix' for this is to copy and paste the code from the xslt file which controls the sliders, into the template for the homepage, thus rendering the macro and the xslt file obsolete?

     

Please Sign in or register to post replies

Write your reply to:

Draft