Oct 18, 2012

Magento: How to add static block in your layout file?

Here we need to do, create static block, and assume we set the "my_test_static_block" as our name/identifier.

As we already created the static block. Place the code below in you layout (xml) file

<block type="cms/block" name="test_main_block">
 <action method="setBlockId">

See attached image for the sample.

Magento: How to add static block in your template file?

Here we need to do, create static block, and assume we set the "my_test_static_block" as our name/identifier.

As we already created the static block. Place the code below in you template (phtml) file.

echo $this->getLayout()

In you looking how to add static in your layout file you found in this link.

Happy reading.

Oct 12, 2012

How to create Live Fedora on USB in Opensuse?

Try to follow this one.

* Find you USB Drive.
# grep -Ff <(hwinfo --disk --short) <(hwinfo --usb --short)
Creating the partition

For me my USB was only design as Live Bootable Disk, in create the new partition I decide to delete current parting and create new one. * Selecting the Disk

# /sbin/fdisk /dev/sdb
* Atfer selected, issue m option to display the help
Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
* Delete the partition:
Command (m for help): d
Selected partition 1
* Create Partition
Command (m for help): n Press n and hit enter
Command action
   e   extended
   p   primary partition (1-4)
p Press p and hit enter
Partition number (1-4, default 1): 
Using default value 1
First sector (2048-3948543, default 2048):  Just hit enter here
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-3948543, default 3948543): Just hit enter here
Using default value 3948543
* Tag the Partition as bootable.
Command (m for help): a Press n and hit enter
Partition number (1-4): 1 As you create only partition press 1
* Verify the partition you create.
Command (m for help): p

Disk /dev/sdb: 2021 MB, 2021654528 bytes
42 heads, 4 sectors/track, 23503 cylinders, total 3948544 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001f52c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048     3948543     1973248   83  Linux
INFO: As you notice Boot colunm has start(*) * Finally you done creating partition, now write the partition in the disk.
Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
Now, write the Live ISO to your USB
# dd if=/home/syntax3rror/Downloads/Fedora-17-i686-Live-KDE.iso of=/dev/sdb
1423360+0 records in
1423360+0 records out
728760320 bytes (729 MB) copied, 286.532 s, 2.5 MB/s
YEHEY, Your done, you can now able to boot Fedora17 live in your USB. just be sure to change the boot priority of your system bios.


* Besure the device NOT mounted. If ever mounted you can umount /dev/sdb * Besure to backups all you important data in you USB. * Besure to use /dev/sdb as device name and NOT /dev/sdb1

Happy Reading and Post if works for you

Oct 4, 2012

Magento - How to access Toolbar property from your list template.

Here's the solution.
In you Catalog List Block add new method.
class Mage_Catalog_Block_Product_List extends ...{


    // I want to access the get pager in my list.phtml template.
    public function getPagerHtml(){
        return $page = $this->getToolbarBlock()->getPagerHtml();

In you list.phtml template has now able to display the pager html.
<?php echo $this->getPagerHtml() ?>

If this help you, dont forget to comment. Enjoooy reading.

Oct 2, 2012

How to enable/install apache mod_rewrite?

From my long time using Redhat. I familiarize how yum work for it. But sadly I switch to Suse cousing teh fedora 17 can't work to change the brightness on my HP Laptop. :((

But now, in the help of google I found it as simple, just need as root access in your terminal and type the command.
a2enmod rewrite

Besure also to to change your apache setting.
AllowOverride None
AllowOverride All

Happy reading and hope will work to you too.

Oct 1, 2012

How to change HOSTNAME in openSUSE?

you can do this in two step.

* Via you terminal type:
# hostname

# hostname winzter.syntax3rror.co.cc

* Modify the hostname file
# vi /etc/HOSTNAME

hAppy reading. :)