神刀安全网

Pro Tips to Navigate and Curate the Magento CMS

Many opportunities are available within the Magento eCommerce platform for developers and business owners alike. You can read this post and learn faster ways to navigate the Magento CMS for content curation.

An eCommerce platform like Magento has put opportunities in the hands of business owners and developers alike. Business owners can scale their businesses quickly, and a good developer can blur the line between a mom-and-pop shop and a $100-million-a-year business.

To launch sites quickly and efficiently, a good developer will understand how Magento data is structured and where things are stored. I will highlight a series of things to do to rapidly build out homepage rows and calls to action in Magento.

Easily Identifiable Blocks to be Called on the Homepage

Along the lines of BEM standards, you should write code so that it is easily identifiable by another developer — because chances are that you won’t be the last person to develop on that site. So your naming convention for your blocks should tell you right where they will go based on their title. As an example, one can easily tell where the block, Homepage Section One, would appear. Simply create a new block using that convention and you’re ready to dive further.

Use a Framework Like Twitter Bootstrap

There are developers who love frameworks and those who feel they are harmful and bloated. Understanding a frameworks syntax can also save you time.

To avoid bloat on your server, you can connect to a CDN and have all of the information pulled as needed. Simply place this in the head of your Magento site:

This will allow you to quickly build a three-column row on your Magento homepage by using this code snippet:

<div class="container"> <div class="row"> <div class="col-md-4"> </div> <div class="col-md-4"> </div> <div class="col-md-4"> </div> </div> </div>

Just place the above inside your Homepage Section One block, and you’re ready to fill the block with your own content.

Save Your Images Directly to the Server

Magento 2 stores images to be used by the CMS in the pub/media/wysiwyg folder. Instead of uploading images one at a time via the CMS, save them directly via SSH or FTP. Once there, create a subdirectory named for their purpose and put the images there. An ideal folder name would be /wysiwyg/homepage-block-images. An important note: Name the image for what they are. It will help for SEO value and for your ease in development. Example: A cup image would be named thirty-two-ounce-glass-cup.png.

Once you have the image in its place, you can call it in your block like this:

<img class="img-responsive" src="{{media url="wysiwyg/homepage-promo-images/thirty-two-ounce-glass-cup.png"}}" alt="Thirty Two ounce Glass Cup" />

Inside your block your code would look like the example below:

<div class="container"> <div class="row"> <div class="col-md-4">                              <img class="img-responsive" src="{{media url="wysiwyg/homepage-promo-images/thirty-two-ounce-glass-cup.png"}}" alt="Thirty Two ounce Glass Cup" /> <h4>32 Ounce Glass Cup</h4></div> <div class="col-md-4"></div> <div class="col-md-4"></div> </div> </div>

Repetition is Where the speed Comes In

Now that you have the basics from above, here’s how you can make things go faster.

  1. Identifiable Blocks: Your blocks all have a number. In your URL, you will see /block_id/ followed immediately by a number. The number is exclusive to a block. If you set up all of your blocks in order, you can navigate by simply changing that block id number.

  2. Frameworks: You can reuse the classes and code to continue building your rows all the way down the page. Modify the col numbers to increase or decrease item sizes.

  3. Direct saves to server and naming conventions: If you followed a distinct naming convention, you can simply type the file naming while reusing the image tag and not have to go looking for the image each time.

As a Magento developer, your clients and/or business owner will appreciate your efficiency in getting them online and into the marketplace quickly — especially startups.

Once you try these discussed ways to navigate the Magento CMS for content curation, give some feedback and share your experience. For any query related to Magento eCommerce development , comment below and get answers instantly.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Pro Tips to Navigate and Curate the Magento CMS

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址