如何保持网站的常见元素一致 - 基本的网络开发问题
如果我要创建一个包含少量页面的简单静态网站,如何保持网站的基本框架(例如导航栏、页眉、页脚、侧边栏)一致?
我喜欢 Dreamweaver 模板功能,您可以在其中创建一个模板文件,其中包含站点所有页面中常见的所有元素,并且当您编辑它时,它会在所有页面上自动更新。显然,我当前使用的 IDE Aptana 中没有类似的东西。
其他 Web 开发 IDE 中是否有类似的功能?
If I'm creating a simple static site with a handful of pages, how do I deal with keeping the basic skeleton of the site (e.g. navigation bar, header, footer, sidebar) consistent?
I love the dreamweaver template function in which you create a template file that contains all the elements of your site that are common among all of your pages and it automatically updates on all pages when you edit it. Apparently, there is nothing like this in Aptana which is the IDE I'm currently using.
Is there something like this in any other web development IDE?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Aptana 和 Textmate 最接近的等效项是命令 > 下的“持久包含”。 HTML>包括菜单。这允许您使用特殊的 HTML 注释引用另一个文件,然后当您想要插入引用的文件的内容时,您可以在该子菜单中运行“更新文档”命令,这将拉入文件内容并替换特殊的内容与它发表评论。
显然,这不是特别动态,您需要在部署项目之前对所有文件运行更新文档。您可能会获取命令的源代码并将其转换为 shell 脚本,作为部署的一部分运行。
The closest equivalent Aptana and Textmate have is "persistent includes" under the Commands > HTML > Includes menu. That allows you to reference another file using a special HTML comment, and then when you want to insert that referenced file's content, you'd run the Update Document command in that sub-menu, which would pull in the file contents and replace the special comment with it.
Obviously this isn't particularly dynamic, and you'd want to run Update document on all the files right before deploying the project. You could likely grab the command's source and turn it into a shell script that you run as part of your deployment.