Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rss ExpressionEngine 2提要解析器和{title}冲突_Rss_Expressionengine - Fatal编程技术网

Rss ExpressionEngine 2提要解析器和{title}冲突

Rss ExpressionEngine 2提要解析器和{title}冲突,rss,expressionengine,Rss,Expressionengine,有没有办法禁用ExpressionEngine 2中的{title}标记?我的客户端只需要一个自定义字段,{rss\u feed},即可添加内容 我使用附加组件解析RSS提要。客户机只想添加一个RSS/Atom提要链接,以便用该特定提要填充网页 问题是ExpressionEngine条目{title}与AJW提要解析器加载项中的{title}字段之间存在冲突 当我使用{title}模板变量时,输出来自ExpressionEngine的默认{title}字段,而不是AJW提要解析器{title}

有没有办法禁用ExpressionEngine 2中的
{title}
标记?我的客户端只需要一个自定义字段,
{rss\u feed}
,即可添加内容

我使用附加组件解析RSS提要。客户机只想添加一个RSS/Atom提要链接,以便用该特定提要填充网页

问题是ExpressionEngine条目
{title}
与AJW提要解析器加载项中的
{title}
字段之间存在冲突

当我使用
{title}
模板变量时,输出来自ExpressionEngine的默认
{title}
字段,而不是AJW提要解析器
{title}

我的代码如下所示:

{exp:channel:entries channel="blog" limit="1" dynamic="on" category="{embed:category}"}
    {exp:ajw_feedparser url="{blog_rss}" itempath="/feed/entry" cache_refresh="60" limit="1"}  
        <article>
            <header>
                <h1>{title}</h1>
                <time>{published format="%l, %j %F %Y at %G:%i"}</time>
                <a href="{author/uri}">{author/name}</a>
            </header>
            {content}
        </article>
    {/exp:ajw_feedparser} 
{/exp:channel:entries}
{exp:ajw_feedparser url="{embed:url_param}" itempath="/feed/entry" cache_refresh="60" limit="1"}  
    <article>
      <header>
        <h1>{title}</h1>
        <time datetime="2011-01-20T06:20:00-00:00">{published format="%l, %j %F %Y at %G:%i"}</time>
        <a href="{author/uri}">{author/name}</a>
      </header>
        {content}
    </article>
{/exp:ajw_feedparser} 
{exp:channel:entries channel=“blog”limit=“1”dynamic=“on”category=“{embed:category}”
{exp:ajw_feedparser url=“{blog_rss}”itempath=“/feed/entry”cache\u refresh=“60”limit=“1”}
{content}
{/exp:ajw_feedparser}
{/exp:channel:entries}

使用PHP还有其他方法吗?

这就是为什么加载项应该包含一个“prefix”参数,以避免这样的变量冲突

无论如何,您可以通过嵌入解决此问题

{exp:channel:entries channel="blog" limit="1" dynamic="on" category="{embed:category}"}
    {embed="_embeds/blog_feed" url="{blog_rss}"}
{/exp:channel:entries}
然后,您的\u嵌入/blog\u提要模板如下所示:

{exp:channel:entries channel="blog" limit="1" dynamic="on" category="{embed:category}"}
    {exp:ajw_feedparser url="{blog_rss}" itempath="/feed/entry" cache_refresh="60" limit="1"}  
        <article>
            <header>
                <h1>{title}</h1>
                <time>{published format="%l, %j %F %Y at %G:%i"}</time>
                <a href="{author/uri}">{author/name}</a>
            </header>
            {content}
        </article>
    {/exp:ajw_feedparser} 
{/exp:channel:entries}
{exp:ajw_feedparser url="{embed:url_param}" itempath="/feed/entry" cache_refresh="60" limit="1"}  
    <article>
      <header>
        <h1>{title}</h1>
        <time datetime="2011-01-20T06:20:00-00:00">{published format="%l, %j %F %Y at %G:%i"}</time>
        <a href="{author/uri}">{author/name}</a>
      </header>
        {content}
    </article>
{/exp:ajw_feedparser} 
{exp:ajw\u feedparser url=“{embed:url\u param}”itempath=“/feed/entry”cache\u refresh=“60”limit=“1”}
{content}
{/exp:ajw_feedparser}

非常感谢,这解决了问题,但我现在有一个新问题。我有分类,在每个分类中,我都会显示特定RSS源的最新3篇博客文章。我显示了3个标题/名称/时间,但每个标题/名称/时间的链接都不起作用:我通过以下方式显示这些列表:{exp:channel:entries channel=“blog”limit=“3”dynamic=“on”category=“{category\u id}”}{embed=“blog/feeds”my\u rss=“{blog\u rss}”}{/exp channel entries:ents}在blog/feeds中链接如下:谢谢!blog/blog_条目到底指向什么?频道入口?我没听懂。也许可以为这个特定问题创建一个新问题?链接应该指向哪里?您希望在blog/blog\u条目中附加什么内容。。。入境证?或者它与RSS提要有关,而不是一个频道条目?寻找这个解决方案很长时间了,非常有用。谢谢