Wednesday, January 30, 2013

How to add new link in menu to new CMS page created in magento

Magento 1.5x cheatsheet series
So, you created new link in your fresh magento installation. Maybe you wrote simple FAQ or billing and shipping information for your customers. And now there is no tool to create link to your newly written masterpiece. As far as my research took me, there actually is no such tool built into magento. Little bit of coding on other hand, can solve this problem quickly.
All you have to do is edit file top.phtml.
If you edit built in theme of magento, then location of file is: /app/design/frontend/base/default/template/catalog/navigation
if you work on your own theme, then file should be in folder:
app/design/frontend/your_theme_name/default/template/catalog/navigation

Once you open file for edit, you should locate code
 <div class="nav-container">     
  <ul id="nav">      
  <?php echo $_menu ?>  
   you add code of your new menu object here  
 </ul>  
And code to add is:
 <a href="<?php echo $this->geturl('about-magento-demo-store') ?>">   
 <?php echo $this->__('About Us')?></a>   
Where 'CMS PAGE IDENTIFIER' is to be changed out with your page identifier. Page identifier in CMS is URL Key, for instance About Us is 'about-magento-demo-store'.
So full code of menu with one object which would connect to CMS page "about us" would be:

  <div class="nav-container">     
  <ul id="nav">     
   <?php echo $_menu ?>   
   <a href="<?php echo $this->geturl('about-magento-demo-store') ?>">   
   <?php echo $this->__('About Us')?></a>   
  </ul>   

Thursday, January 17, 2013

Kona Sutra bicycle

One of my passions is also cycling, especially touring and bicycle travel. So from time to time I might also write a word or two about my cycling adventures or gear or other things related to cycling.

Ready for adventure
I love cycling. I learned to ride bicycle when I was about 4 years old and never stopped till now. I evolved over BMX to Mountain Bikes and never fancied racing cycles. I was used to go over stairs, over curbs, over roots etc. And never stop or step off bicycle. So naturally I saw thin tires as a big problem. I know that you can ride faster on thin tires, but I was willing to lose some energy through tires for comfort of going over obstacles (easier or at all).

Touring by Danube river - Donauradweg
But one of my big loves is touring and for last 12 years I was doing it on a Steppenwolf Timber bicycle. I still love this bike, since it survived a lot and never let me down. Alhtough lately there is some serious problem with LX shifters which still waits for solution.
Anyways, last time I went for a longer ride my neck hurt like hell and after few days, I hardly moved my head.  You can imagine that that was a big problem,especially when riding on car roads.
Since then I was looking to replace bicycle for more comfortable one. My first tought was trekking bicycle. But somehow I did not find one that I would really fall in love with. So I continued to ride my truthful wolf. Then I came over Trek 520 which seemed nice machine. But problem was that such bike is not in stock in our country and I just could not order it “blindly”. So I put my dream about touring bicycle aside for some time. But then I stroke gold - our Kona distributor had last year (2011) Sutra in stock and for quiet nice price. So, I had to go and take a look. After checking it out and trying it out little bit, I had to “sleep it over”. But Sutra put a hook in me instantly. So few days later I called to a shop and ordered flat pedals (did I mention that I do not like SPDs?) and next day english green Kona sutra became my preciousss.


First of all please keep in mind that till recently I was die hard mountain bike rider and some of my comments might be funny to you.


So my first responses:
  • very comfortable
  • on asphalt way faster than my wolf (wolf had Ritchey Speedmax 2.1 tires) - I can travel same distance with less effort and faster. But Timber does accelerate faster, since it is lighter and has smaller wheels. Not to mention more agressive position. Especially since I put it on Schwalbe 1.5 marathon plus tires.
  • hmmm, where is front suspension? I feel road holes I never noticed before
  • I expected disc brakes to be more efficient - guess more breaking in is needed (my wolf has LX cantilever brakes)
  • hmmm, should I carry bike over these steps? (sure I did)
  • I am still not 100% sure about handlebar - on one hand it offers many positions which means more comfort, BUT (yeah that but again) in my favourite position brake handles are not under the tips of my fingers, as I was used on mountain bike
  • shifters on the end of handlebar are different but to me it is not a problem, since I don’t shift gears that much
  • weight - bike is quite heavy - approx. 15 kgs if I am not mistaken. But it does not feel as heavy bike once on a road, especially because I do not jump with it or do any other crazy stuff I am used to do with mountain bike
Handling on macadam - you can drive it on macadam. For now I am very cautious, since I am not so used to handlebar and it “floats” way easier than my mountain bike with wider tires.
So far I am really happy with my choice and have serious suspicion that mountain bike will be used for shorter outings and harsher terrain. But my main touring bike will be definitely Kona Sutra.


Above was written shortly after I purchased Sutra. After first few thousand kilometers I have more comments for anyone interested:
I actually really love handlebar. It might not allow so fast responses as MTB handlebar, but it offers various handling positions which helps tremendously on longer tours.


hanling on macadam - since ,my writing and many kilometers I feel quiet sure on macadam. As long it is not too bumpy it is completely fine.
Disc brakes are really nice once you get used to it.
Regarding Sutra, I think it is really good bicycle and will probably serve me for a long time.