strangeness about list_article_topics and list_articles with topic constraint
  • Hello again,

    there is something strange about list_articles with topic constraint.

    I have several articles with topics, e.g. 'Partner','IBM Tivoli','HA','Loadbalancing' and more, but the concerning articles are not printed.

    Look:

            <ul>
            {{ list_article_topics }}
                    <li>{{$gimme->topic->name}}</li>
            {{ /list_article_topics }}
            </ul>

            {{assign var=array value=array('Partner','IBM Tivoli','HA','Loadbalancing')}}
            <pre>{{$array|print_r}}</pre>
            {{foreach from=$array item=item}}
                    {{assign var=topicname value=$item|cat:':de' }}
                    {{ local }}
                    {{ unset_topic }}
                    {{set_topic name="$item" }}
                    [[{{$topicname}},{{$item}}]]
                    {{list_articles ignore_issue="false" ignore_section="true" constraints="topic is `$topicname` matchAllTopics"}}
                            <h6>matchAllTopics: {{$topicname}} <a href="{{ $gimme->article->url }}" title="{{ $gimme->article->title }}">{{ $gimme->article->title }}</a></h6>
                    {{/list_articles}}
                    {{list_articles ignore_issue="false" ignore_section="true" constraints="topic is `$topicname` matchAnyTopic"}}
                            <h6>matchAnyTopic: {{$topicname}} <a href="{{ $gimme->article->url }}" title="{{ $gimme->article->title }}">{{ $gimme->article->title }}</a></h6>
                    {{/list_articles}}
                    {{/local }}
                    <hr />
            {{/foreach}}<br />

    produces following output:

    Themen



    • Endpoint Security
    • IBM Tivoli
    • IBM Tivoli
    • IBM Tivoli
    • Security
    • Monitoring
    • Software
    • Software
    • Software
    • Mobile Device
    • Microsoft Windows
    • Linux
    • UNIX/AIX
    • Veranstaltungen
    • Events
    • Mitarbeiter
    • Mitarbeiter
    • Partner
    • Backup/Recovery
    • HA
    • Loadbalancing


    Array
    (
    [0] => Partner
    [1] => IBM Tivoli
    [2] => HA
    [3] => Loadbalancing
    )
    1




    [[Partner:de,Partner]]








    [[IBM Tivoli:de,IBM Tivoli]]








    [[HA:de,HA]]

    matchAllTopics: HA:de Skalierbarkeit



    matchAnyTopic: HA:de Skalierbarkeit








    [[Loadbalancing:de,Loadbalancing]]

    matchAllTopics: Loadbalancing:de Skalierbarkeit



    matchAnyTopic: Loadbalancing:de Skalierbarkeit

    while I was expecting to get a list of articles as well with 'Partner','IBM Tivoli'.

    And even the $gimme->article->url of the list_articles list is wrong, as there is for 'Skalierbarkeit' not the specific page (with .htm) but only the node URL is given.

    What is getting me wrong?

    Best regards,

    Thomas.
  • 2 Comments sorted by
  • The $gimme->article->url is correct, as <a href="{{ uri options="article" }}" title="{{ $gimme->article->title }}"> should be used.
    But the other thing is still unclear, why articles with one or more topics are not found.
  • Did you try the preview mode (from issue list, click 'preview' icon for current issue). Sometimes bottom frame doesn't show parse error even if there are some, so try looking at the top frame's html source - on the bottom of it you can find the error messages, if there are some. 
    --
    Ljuba Rankovic
    Senior Front End Developer, Sourcefabric
    ljuba.rankovic@sourcefabric.org

    http://www.sourcefabric.org
    http://www.twitter.com/Sourcefabric