SSI - 只包含部分文件? [英] SSI - Only include part of file?

查看:92
本文介绍了SSI - 只包含部分文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文件,里面包含了很多新闻&我使用SSI在网站上展示的更新。我想要做的是让这些新闻和更新的子集出现在网站的其他位置。

I have a file which contains a lot of news & updates that I display on my website using SSI. What I would like to do is to have a subset of these news and updates that appear in a column elsewhere in the website.

我尝试过在网上浏览,但是我我不确定这是否可能。我觉得我需要创建一个包含子集的新文件。

I have tried looking around online, however I'm not sure if this is even possible. I get the impression that I'd need to create a new file that contains the subset. I just feel this solution isn't particularly elegant since I'm duplicating data.

有没有人有任何想法?

推荐答案

由于您无法包含文件的一部分,因此您有几个选项:

Since you can't include part of a file you have a couple of options:


  1. 将文件分成两部分,包括两部分,当你只需要这两部分时,只包含一部分。

  2. 将文件分成两部分并创建第三个SSI,其中包括都。然后在您需要的页面上,您可以只包含一个包含您的文件。

这篇关于SSI - 只包含部分文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆