Jump to content

How to split channels by groups


Recommended Posts

I'm looking to separate channels groups  so  I can display on different pages each group.

Example Groups: TV series , Movies,  Music Videos.

Maybe adding on top menu each group and using display filter to display each group with common template.

Or if you have a easier solution let me know


Link to comment
Share on other sites

It works in the same way in all cases.

1) First you need to modify list_dvds block that renders list of channels - to add support for filtering by channel group:

https://kvs-demo.com/admin/project_pages.php?action=change_block&item_id=channels||list_dvds||channels_list&item_name=Channels List

In block parameters you need to enable var_dvd_group_dir=group, and after doing so you will be able to filter this list by passing channel group directory in group parameter in the URL:



2) Next, it doesn't show block title correctly, it doesn't consider filtering there. Then you need to update this block template as well. The block title is set by this line:

{{assign var="list_channels_title" value=$lang.channels.list_title_by_sorting[$sort_by]}}

Should be changed like this (e.g. if we are rending list by group, then take title from group title, otherwise use default title):

{{if $list_type=='dvds_groups'}}
    {{assign var="list_channels_title" value=$dvd_group_info.title}}
    {{assign var="list_channels_title" value=$lang.channels.list_title_by_sorting[$sort_by]}}


3) Finally, similar title logic should be probably applied to the page itself, for HTML title:


Instead of this line:

{{assign var="page_title" value=$lang.html.channels_title}}

Use this:

{{if $storage.list_dvds_channels_list.list_type=='dvds_groups'}}
    {{assign var="page_title" value=$storage.list_dvds_channels_list.dvd_group_info.title}}
    {{assign var="page_title" value=$lang.html.channels_title}}


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...