magento模板区块--首页content区块
首页替换
自定义首页content内容
在cms-->>page 新建首页
在content 里加入
--------------------------
<div class="col-left side-col">
<p class="home-callout"><a href="{{store direct_url="apparel/shoes/womens/anashria-womens-premier-leather-sandal.html"}}"><img src="{{skin url='p_w_picpaths/ph_callout_left_top.gif'}}" border="0" alt="" /></a></p>
<p class="home-callout"><img src="{{skin url='p_w_picpaths/ph_callout_left_rebel.jpg'}}" border="0" alt="" /></p>
{{block type="tag/popular" template="tag/popular.phtml"}}</div>
<div class="home-spot">
<p class="home-callout"><img src="{{skin url='p_w_picpaths/home_main_callout.jpg'}}" border="0" alt="" width="470" /></p>
<p class="home-callout"><img src="{{skin url='p_w_picpaths/free_shipping_callout.jpg'}}" border="0" alt="" width="470" /></p>
<div class="box best-selling">
<h3>Best Selling Products</h3>
<table border="0" cellspacing="0">
<tbody>
<tr class="odd">
<td><a href="{{store direct_url="sony-vaio-vgn-txn27n-b-11-1-notebook-pc.html"}}"><img class="product-img" src="{{skin url='p_w_picpaths/media/best_selling_img01.jpg'}}" border="0" alt="" width="95" /></a>
<div class="product-description">
<p><a href="{{store direct_url="sony-vaio-vgn-txn27n-b-11-1-notebook-pc.html"}}">Sony VAIO VGN-TXN27N/B 11.1" Notebook PC</a></p>
<p>See all <a href="{{store direct_url="electronics/computers/laptops.html"}}">Laptops</a></p>
</div>
......................................................
============================================
default使用这种方式。
或者加入:
-----------------------------------------
{{block type="core/template" template="sample/home.phtml"}}============================================
意思是:在首页的内容区块里加入新的区块,template 为调用的模板
content讲显示home.phtml里的内容:
-------------------------------------------
<div style=" float:left; width:653px;">
<img src="<?php echo $this->getSkinUrl('p_w_picpaths/media/home_co_main.jpg');?>" alt="" />
</div>
<div style="float:right; width:280px;">
<div style="margin:0 0 10px;" ><img src="<?php echo $this->getSkinUrl('p_w_picpaths/media/home_co_tr.gif');?>" alt="" /></div>
<!-- div><img src="<?php echo $this->getSkinUrl('p_w_picpaths/media/home_co_br.gif');?>" alt="" /></div -->
</div>
<div class="clearer"></div>
<div style="margin:10px 0 0;"><img src="<?php echo $this->getSkinUrl('p_w_picpaths/media/home_co_bottom.gif');?>" alt="" /></div>
==================================================
modern使用这种方式
或者加入
--------------------------
{{block type="catalog/product_list" template="catalog/product/home.phtml" category_id="35"}}
===========================================
category_id为要显示商品所在的category的id,在catalog-->>categories里建立。
直接写+引入block
-------------------------------------------------
<div id="slider-wrap" class="slider-wrap" style="overflow: hidden; height: 280px;">
<div id="slider-content" class="slider-wrap"> <a href="#"><img src="{{media url="bluescale/01.jpg"}}" alt="" width="741" height="280" /></a> <a href="#"><img src="{{media url="bluescale/02.jpg"}}" alt="" width="741" height="280" /></a><a href="#"><img src="{{media url="bluescale/03.jpg"}}" alt="" width="741" height="280" /></a></div>
</div>
<p class="home-callout"><a href="{{store direct_url="apparel/shoes/womens/anashria-womens-premier-leather-sandal.html"}}"><img src="{{skin url='p_w_picpaths/ph_callout_left_top.gif'}}" border="0" alt="" /></a></p>
<div class="best_sellers_title"><span>Our Best Sellers</span></div>
<div>
{{block type="catalog/product_list" template="catalog/product/home.phtml" category_id="30" column_count="5"}}</div>
=====================================================
引入图片的方法:
{{skin url=''}}
skin文件夹下的模板名p_w_picpaths文件夹
在Design下可以引用区块:
layout 选择 主页的布局,引用哪一个首页模板
layout update xml 可以 引用区块,以改变首页的显示
----------------------------------------------
<reference name="content">
<block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml" after="cms_page"><action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action></block>
<block type="reports/product_viewed" name="home.reports.product.viewed" alias="product_viewed" template="reports/home_product_viewed.phtml" after="product_new"><action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action></block>
<block type="reports/product_compared" name="home.reports.product.compared" template="reports/home_product_compared.phtml" after="product_viewed"><action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action></block>
</reference><reference name="right">
<action method="unsetChild"><alias>right.reports.product.viewed</alias></action>
<action method="unsetChild"><alias>right.reports.product.compared</alias></action>
</reference>
=================================================
修改首页的左边栏
1 用静态区块
在cms-->>添加 static blolck
home_left_info
-------------------------------------------
<p><img src="{{skin url="p_w_picpaths/media/home_co_tr.gif"}}" alt="" /></p>
<p> </p>
<p><img src="{{skin url="p_w_picpaths/media/home_co_br.gif"}}" alt="" /></p>
==============================================
在cms-->>page里的 home page的design
--------------------------------------------------
<reference name="left">
<block type="cms/block" name="home_page_left_block" after="left_info_block">
<action method="setBlockId"><block_id>home_page_left_block</block_id></action>
</block>
</reference>
===========================================
转载于:https://blog.51cto.com/phpmidding/635748
相关文章:
遮挡也能识别?地平线提出时序信息提升行人检测准确度|CVPR 2020
来源 | 驭势科技行人检测作为计算机视觉领域最基本的主题之一,多年来被广泛研究。尽管最先进的行人检测器已在无遮挡行人上取得了超过 90% 的准确率,但在严重遮挡行人检测上依然无法达到满意的效果。究其根源,主要存在以下两个难点࿱…

通过响应式web设计,使本站支持手机浏览
2019独角兽企业重金招聘Python工程师标准>>> 2014-01-28 14:49:14 现在越来越多的人通过手机来上网,手机由于屏幕尺寸的原因,当浏览为PC端浏览器设计的网页的时候,往往会出现各种各样的问题。 糊涂僧的这个小博客也一样࿰…

在ASP.NET中跨页面实现多选
作者:孟宪会 微软MVP SelectMultiPages.aspx <% Page EnableViewState"true" CodeBehind"SelectMultiPages.aspx.cs" Language"c#" AutoEventWireup"false" Inherits"eMeng.Exam.SelectMultiPages" %><…

c#有多少种可能导致写文件失败?
1.路径中有非法字符 Path.GetInvalidPathChars() 2.文件名中有非法字符 Path.GetInvalidFileNameChars() 3.文件创建时,文件夹只读。 4.文件创建时,文件夹权限不足,如需要管理员权限。 5.文件创建时,文件夹不存在。 6.系统目录&am…
抖音、快手和直播行业的火爆究竟给了谁机会?
经常收到一些CSDN小伙伴的留言,反馈如下这样的困惑“短视频这么火爆,我该学些什么技术才能入行?”“我想从事音视频开发,该如何入门和进阶?真的像坊间传闻的那么难吗?”音视频的开发前景做一个不恰当的比喻…

android上line-height的问题
关于line-height大家应该非常熟悉了吧,就是用来做垂直居中的,屡试不爽,基本上没有什么问题,但是最近一个项目,测试提了一个bug,看图吧。 从别处窃的图,这个问题只有安卓上才能复现,做…

深入讲解 ASP+ 验证
Anthony Moore Microsoft Corporation 2000年10月简介 这篇文章详细讲解了 ASP 验证控件的工作方式。如果要生成其中包含验证控件的复杂页面,或是要扩展验证框架,建议您阅读本文。如果要学习使用验证控件,或是要决定是否使用验证控件&…

EditText和TextView出现中文、英文等string串的排版问题
默认EditText和TextView自动换行。如果在string中出现了中文字符,排版出现意外,如图所示: 这是因为软盘默认的是半角输入,而字母与数字的占位与汉字不同,所以在默认的情况下会出现如上的排版情况。 但是如果将默认的半…
阿里云蒋江伟:我们致力于为世界提供70%的算力 | 凌云时刻
导读:6月9日,2020阿里云峰会在云端召开,阿里巴巴合伙人、阿里云智能基础产品事业部高级研究员蒋江伟出席峰会并做了题为《新基建,新算力:阿里云基础设施算力全新升级》的重磅发布。(以下内容为演讲实录&…

zabbix 微信报警( python 2.x )
python 2.x 微信报警脚本#!/usr/bin/python #_*_coding:utf-8 _*_ __author__ lvnianimport urllib,urllib2 import json import sysdef gettoken(corpid,corpsecret):gettoken_url https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid corpid &corpsecret corpsec…
利用 AssemblyAI 在 PyTorch 中建立端到端的语音识别模型
作者 | Comet译者 | 天道酬勤,责编 | Carol出品 | AI 科技大本营(ID:rgznai100)这篇文章是由AssemblyAI的机器学习研究工程师Michael Nguyen撰写的。AssemblyAI使用Comet记录、可视化和了解模型开发流程。深度学习通过引入端到端的…

PHP中的页面跳转
PHP页面跳转一、header()函数 点击按钮<input type"submit" name "submit" value"确定" /> 使用POST方式<form action"X.php" method"post"> X.php页面只做判断逻辑 处理完以后 <?php //isset函数 if…

Closure Compiler 使用
为什么80%的码农都做不了架构师?>>> 该项目首页:http://code.google.com/intl/zh-CN/closure/compiler/ 下载地址:http://closure-compiler.googlecode.com/files/compiler-latest.zip 下载后解压,即可看到compiler.j…

如何通过动态生成Html灵活实现DataGrid分类统计的界面显示功能
作者:未知 请作者速与本人联系步入 IT 业已经有几年的时间了 , 从最早接触 pb6.0 到现在 .Net 技术 , 计算机技术不论是从硬件还是软件都有巨大的进步 . 而中国程序员总体水平在世界上也是远远落后,其中缺乏完善的体系、必要的交流和程序员个人英雄主义…

Revit二次开发之“选择某一楼层的墙”
其实就是过滤器的用法。这里想要找到同一楼层中的风管,不可行。 要用:duct.ReferenceLevel//选择某一楼层上的墙[Transaction(TransactionMode.Manual)][Regeneration(RegenerationOption.Manual)]//[Journaling(JournalingMode.NoCommandData)]publiccl…
百变应用场景下,优酷基于图执行引擎的算法服务框架筑造之路!
作者| 阿里文娱高级专家 随方,阿里文娱开发专家 轩成责编 | 屠敏头图 | CSDN 下载自视觉中国背景在阿里的业务中,有广泛的算法应用场景,也沉淀了相关的算法应用平台和工具:基础的算法引擎部分,有成熟的召回和打分预估引…

Attach Volume 操作(Part II) - 每天5分钟玩转 OpenStack(54)
上一节我们讨论了 attach volume 操作中 cinder-api 的工作,本节讨论 cinder-volume 和 nova-compute 如何将 volume attach 到 Instance。cinder-volume 初始化 volume 的连接cinder-volume 接收到 initialize_connection 消息后,会通过 tgt 创建 targe…

关于DataGrid等控件中的自动编号
作者:未知 请作者速与本人联系序号内容1Taye2BOx3Glass4StarCraft一、正序A、AllowPagingFalse情况下<asp:DataGrid id"DataGrid1" runat"server"> <Columns> <asp:TemplateColumn> <ItemTemplate> …

45个优秀的国外电子商务网站设计实例
这篇文章与大家分享45个国外优秀的电子商务网站设计案例,希望能带给你灵感。对于电子商务网站来说,也许销售更多产品比漂亮的外观设计更重要,不过漂亮的东西总是能给用户留下深刻的印象,一起欣赏。 TALBOTS Free People Armani Ex…
曝光!十万开发者喜爱的顶级当红讲师
作为一枚后浪程序员,在互联网时代下我们拥有巨大优势:知识的时间空间界限被打破,让我们有机会学习到前沿技术知识。以往,大部分程序员都是是通过传统的博客文章、参与线下会议等形式来获取最新知识,而 CSDN 推出的在线…

连接centos7桌面方法
方法一: 第一步$sudo yum install tigervnc* 第二步$vncserver(提示输入连接密码) 第三步关防火墙或开5901..等端口 第四步vncview连接 方法二: 下载nomachine https://www.nomachine.com/download/linux&id1rpm -…

让“云”无处不在-Citrix Xenserver之一 环境搭建
让“云”无处不在-Citrix Xenserver 一、准备部署环境 马博峰 2011年8月 ——————————————————————————————————————— 一、Xenserver介绍 Citrix XenServer 是一个完整的服务器虚拟化平台,已针对 Windows 和 Linux 虚拟服务器…

DataGrid/DataList
很久以前就想写一些关于DataGrid/DataList的东西,但是一直以来,一方面自感所学未深,另一方面,总觉无从下笔,一拖再拖,离刚开始的念头已距一年有余。DataGrid/DataList在ASP.NET中的重要性,想必就…
京东姚霆:推理能力,正是多模态技术未来亟需突破的瓶颈!
受访者 | 姚霆,京东 AI 研究院算法科学家记者 | 夕颜来源 | CSDN(ID:CSDNnews)21 世纪,没有谁不知道电商,工资可以不发,但是每个月不网购几单,那是不可能的!打开熟悉的购…

[转]C#网络编程(异步传输字符串) - Part.3
本文转自:http://www.tracefact.net/CSharp-Programming/Network-Programming-Part3.aspx 这篇文章我们将前进一大步,使用异步的方式来对服务端编程,以使它成为一个真正意义上的服务器:可以为多个客户端的多次请求服务。但是开始之…

【百度地图API】——如何用label制作简易的房产标签
摘要: 最近,API爱好者们纷纷说,自定义marker太复杂了!不仅定义复杂,连所有的dom事件都要自己重新定义。有没有快速简易创建房产标签的方法呢? 答案当然是有的啦~ 我们可以利用label嘛! --------…

李洪根关于[SQL]对于分页存储过程
作者:李洪根 微软MVP1。我个人认为最好的分页方法是: Selecttop10*fromtablewhereid>200写成存储过程,上面的语句要拼一下sql语句,要获得最后大于的哪一个ID号2。那个用游标的方式,只适合于小数据量的表,如果表在一万行以上,就差劲了你的存储过程还比不上NOT IN…
避不开的算法,如何吃透?
作者 | Alekya Ragipally译者 | 弯月,编辑 | 屠敏题图 | 自东方 IC出品 | AI科技大本营(ID:rgznai100)当你使用搜索引擎(例如Google Chrome、Mozilla Firefox等)的时候,后台发生了什么ÿ…

CentOS 6.4下PXE+Kickstart无人值守安装操作系统
一、简介1.1 什么是PXEPXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服务器下载映像,并由此支持通过网络启动操作系统,在…

Asp.NET中常用的一些优化性能的方法
ASP.NET 的缓存机制相比ASP有很大的改进,本文档除对常用优化方法进行总结介绍外,强调了如何使用ASP.NET的缓存来获得最佳性能。1:不要使用不必要的session 和ASP中一样,在不必要的时候不要使用Session。可以针对整个应用程序或者页…