Results 1 to 8 of 8

Thread: multisite problem

  1. #1
    User
    Join Date
    05-02-10.
    Posts
    121

    Default multisite problem

    I have many news archives.

    for example (titles)

    site1.com News 1
    site1.com News 2
    site2.com News 1
    ...

    All tags are displayed in each archive.
    this is a problem

    I think that it is necessary to display tags for each root page individually


    and maybe add choosen for tag list
    sorry for my english

  2. #2
    User
    Join Date
    06-10-09.
    Location
    Loxstedt, Germany
    Posts
    54

    Default

    Hi,

    just use the specialized tags_xxxx extensions and the Tag Cloud modules that come with these.
    E.g. if you install tags_news, there will be a TagCloud (News) module which allows you to choose from news archives to build the tag cloud.
    This should help you with multisites.

    Cheers,
    Helmut

    Quote Originally Posted by Energetik View Post
    I have many news archives.

    for example (titles)

    site1.com News 1
    site1.com News 2
    site2.com News 1
    ...

    All tags are displayed in each archive.
    this is a problem

    I think that it is necessary to display tags for each root page individually


    and maybe add choosen for tag list
    Blackmail's such an ugly word. I prefer extortion -- the "x" makes it sound cool.
    -- Bender

  3. #3
    User
    Join Date
    05-02-10.
    Posts
    121

    Default

    I talked about the backend (BE).

    many tags from all archives (in tl_news)

    tag1 tag2 tag3 tag4 tag5 tag6 tag7 tag8 tag9 tag10
    tag11 tag12 tag13 tag14 tag15 tag16 tag17 tag18 tag19 tag20
    sorry for my english

  4. #4
    User
    Join Date
    06-10-09.
    Location
    Loxstedt, Germany
    Posts
    54

    Default

    Ah ok,

    I don't know if I can fix this. I'll check what I can do here.
    Cheers,
    Helmut

    Quote Originally Posted by Energetik View Post
    I talked about the backend (BE).

    many tags from all archives (in tl_news)

    tag1 tag2 tag3 tag4 tag5 tag6 tag7 tag8 tag9 tag10
    tag11 tag12 tag13 tag14 tag15 tag16 tag17 tag18 tag19 tag20
    Blackmail's such an ugly word. I prefer extortion -- the "x" makes it sound cool.
    -- Bender

  5. #5
    User
    Join Date
    05-02-10.
    Posts
    121

    Default chosen

    1)

    tags/dca/tl_news.php

    in
    $GLOBALS['TL_DCA']['tl_news']['fields']['tags']
    add
    eval 'chosen'=>true,'multiple'=>true
    and
    'options_callback' => array('test', 'mylist')

    in mylist function
    do list tags and saved tags (like in tags/classes/TagField.php)

    example

    Last edited by Energetik; 02/19/2014 at 15:37.
    sorry for my english

  6. #6
    User
    Join Date
    05-02-10.
    Posts
    121

    Default

    2) maybe use Materialized Path, Nested Sets or contao built-in functions
    to split tags by root pages

    only show tags from all news archives by root (jumpTo)

    for example

    news archives:

    news_archive1 (jumpTo to page1)
    news_archive2 (jumpTo to page2)
    news_archive3 (jumpTo to page3)

    page1 relates to root with domain site1.com
    page2 relates to root with domain site2.com
    page3 relates to root with domain site1.com

    in news1 from news_archive1 show only tags from news_archive1 and news_archive3

    difficult to translate )))
    Last edited by Energetik; 02/19/2014 at 15:59.
    sorry for my english

  7. #7
    User
    Join Date
    05-02-10.
    Posts
    121

    Default

    TagField.php

    public function generate()
    {
    $taglist = new TagList($this->table);
    $taglist->maxtags = $this->intMaxTags;
    $tags = $taglist->getTagList();
    $list = '<div><select class="tl_select tl_chosen" onchange="javascript:Tag.selectedTag(this.options[this.selectedIndex].value, \'ctrl_'.$this->strId.'\');">';
    $list .= '<option value=""></option>';
    foreach ($tags as $tag)
    {


    $list .= '<option value="' . $tag['tag_name'] . '">' . $tag['tag_name'] . '</option>';

    }
    $list .= '</select></div>';
    $value = (!$this->blnSubmitInput) ? $this->readTags() : $this->varValue;
    return sprintf($list.'<input type="text" name="%s" id="ctrl_%s" class="tl_text%s" value="%s"%s onfocus="Backend.getScrollOffset();" />',
    $this->strName,
    $this->strId,
    (strlen($this->strClass) ? ' ' . $this->strClass : ''),
    specialchars($value),
    $this->getAttributes());
    }
    sorry for my english

  8. #8

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •