Magento Forum

Slider picture’s linking to main category. 
 
Golfpartsonline
Jr. Member
 
Total Posts:  10
Joined:  2010-04-28
 

hello.

can anybody tell me how i can use my slider’’ magento classic them ‘’ to link them to category’s?

<div id="slider">
    <
div class="slidercontrolwr">
        <
div class="slidercontrol">
        <
a href="#" class="aprev" title="Previous" onclick="my_glider.previous();return false;">Previous</a>
        <
a href="#" class="astop" title="Stop" onclick="my_glider.stop();return false">Stop</a>
        <
a href="#" class="aplay" title="Play" onclick="my_glider.start();return false">Start</a>
        <
a href="#" class="anext" title="Next" onclick="my_glider.next();return false">next</a>
        </
div>
    </
div>
    <
div class="scroller">
        <
div class="content">
            <
div class="section" id="section1">
                <
a href="{{store url=""}}" title=""><img src="{{skin url="images/slider1.jpg"}}" alt="" /></a>
            </
div>
            <
div class="section" id="section2">
                <
a href="{{store url=""}}" title=""><img src="{{skin url="images/slider2.jpg"}}" alt="" /></a>
            </
div>
            <
div class="section" id="section3">
                <
a href="{{store url=""}}" title=""><img src="{{skin url="images/slider3.jpg"}}" alt="" /></a>
            </
div>
            <
div class="section" id="section4">
                <
a href="{{store url=""}}" title=""><img src="{{skin url="images/slider4.jpg"}}" alt="" /></a>
            </
div>
        </
div>
    </
div>
</
div>
<
script src="{{skin url=""}}js/glider.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
    var 
my_glider = new Glider('slider'{duration:0.5autoGlidefalsefrequency4initialSection'section1'});
</script>

maybe it is a easy change but i am still learning and don’t want to make some critical errors.

thnx

 
Magento Community Magento Community
Magento Community
Magento Community
 
ThemesMGNTO
Member
 
Avatar
Total Posts:  39
Joined:  2009-05-13
Delaware, USA
 

Hello,

Notice that there are several lines of code like this one:

<a href=\"{{store url=\"\"}}\" title=\"\"><img src=\"{{skin url=\"images/slider1.jpg\"}}\" alt=\"\" /></a>

Each line like this is a link which is currently linking to store\’s homepage URL. In order for you to link each of the images to different categories you should change - {{store url=\"\"}} - to something like this - {{store url=\"first-category-name/\"}}.

{{store url=\"\"}} -> This code actually represents your store\’s URL.

In order to explain how this works please bare with me.
Let\’s say for example that your store is installed on this address: http://www.your-store.com/magento/.
In this case, {{store url=\"\"}} actually represents http://www.your-store.com/magento/.
{{store url=\"first-category-name/\"}} -> actually translates to: http://www.your-store.com/magento/first-category-name/.

In order to simplify the process for you now that we have explained how it works, we\’ll write down a code examole for you.
In this example we\’ll assume your categories URL is like these:
http://www.your-store.com/magento/first-category-name/
http://www.your-store.com/magento/second-category-name/
http://www.your-store.com/magento/third-category-name/
http://www.your-store.com/magento/fourth-category-name/

Here is how the code would look like if the above were really links to your categories:

<div id=\"slider\">
    <
div class=\"slidercontrolwr\">
        <
div class=\"slidercontrol\">
        <
a href=\"#\" class=\"aprev\" title=\"Previous\" onclick=\"my_glider.previous();return false;\">Previous</a>
        <
a href=\"#\" class=\"astop\" title=\"Stop\" onclick=\"my_glider.stop();return false\">Stop</a>
        <
a href=\"#\" class=\"aplay\" title=\"Play\" onclick=\"my_glider.start();return false\">Start</a>
        <
a href=\"#\" class=\"anext\" title=\"Next\" onclick=\"my_glider.next();return false\">next</a>
        </
div>
    </
div>
    <
div class=\"scroller\">
        <
div class=\"content\">
            <
div class=\"section\" id=\"section1\">
                <
a href=\"{{store url=\"first-category-name/\"}}\" title=\"\"><img src=\"{{skin url=\"images/slider1.jpg\"}}\" alt=\"\" /></a>
            </
div>
            <
div class=\"section\" id=\"section2\">
                <
a href=\"{{store url=\"second-category-name/\"}}\" title=\"\"><img src=\"{{skin url=\"images/slider2.jpg\"}}\" alt=\"\" /></a>
            </
div>
            <
div class=\"section\" id=\"section3\">
                <
a href=\"{{store url=\"third-category-name/\"}}\" title=\"\"><img src=\"{{skin url=\"images/slider3.jpg\"}}\" alt=\"\" /></a>
            </
div>
            <
div class=\"section\" id=\"section4\">
                <
a href=\"{{store url=\"fourth-category-name/\"}}\" title=\"\"><img src=\"{{skin url=\"images/slider4.jpg\"}}\" alt=\"\" /></a>
            </
div>
        </
div>
    </
div>
</
div>
<
script src=\"{{skin url=\"\"}}js/glider.js\" type=\"text/javascript\"></script>
<script type=\"text/javascript\" charset=\"utf-8\">
    var 
my_glider = new Glider(\'slider\'{duration:0.5autoGlidefalsefrequency4initialSection\'section1\'});
</script>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Golfpartsonline
Jr. Member
 
Total Posts:  10
Joined:  2010-04-28
 

thank you so much, did the trick… and i also know a little more coding thanks to you!

best regards,

Joris

 
Magento Community Magento Community
Magento Community
Magento Community
 
myonlinewinkel
Jr. Member
 
Total Posts:  7
Joined:  2011-09-11
 

I have same problem. I know how can i link it but.
I can not find where is this code file saved?

 
Magento Community Magento Community
Magento Community
Magento Community
 
vjtemplates
Guru
 
Avatar
Total Posts:  408
Joined:  2010-12-15
Washington, USA
 
Jacobdixon - 22 November 2011 07:46 PM

Where Can I found a download of Magento to work on?

You can go here http://www.magentocommerce.com/download

 
Magento Community Magento Community
Magento Community
Magento Community
 
GoMageTeam
Guru
 
Avatar
Total Posts:  356
Joined:  2013-01-13
Warsaw, Poland
 

Hello guys,

To do the appropriate customizations or to configure the slider to your needs is a great thing, but it saves your time if it is easy and fast. So, we dare suggest to try our GoMage Slider extension, which will help you to get the best result on your store pages.

The extension files are not encrypted and you can do any customizations you want.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top