Jump to content

Default Theme View page Related Albums


Serghei

Recommended Posts

Albums list is displayed by list_albums block. So in order to show list of connected albums you need to insert list_albums block into View Video page template:

{{insert name="getBlock" block_id="list_albums" block_name="Connected Albums"}}

After saving page editor with this new line, it will create Connected Albums block in page blocks section. Then you need to go editing this block and configure it to switch into connected albums mode. In order to do this you have to enable mode_connected_video parameter along with var_connected_video_id (they are located under the same parameter group).

Finally you need to adjust Connected Albums block template to render albums instead of default <div>Connected Albums</div> placeholder. You can use this code from the start, that will simply re-use the default albums list display:

{{include file="include_list_albums_block_common.tpl"}}

 

  • Thanks 1
Link to comment
Share on other sites

  • Tech Support changed the title to Default Theme View page Related Albums

Hi! I have used this code and works fine 

<div class="related-albums" id="{{$block_uid}}">
    <ul class="list-sort" id="{{$block_uid}}_filter_list">
        {{if $related_mode!=4 && $related_mode!=3}}
            <li><span>{{$lang.albums.related_albums_title_default}}</span></li>
        {{else}}
            <li><a data-action="ajax" data-container-id="{{$block_uid}}_filter_list" data-block-id="{{$block_uid}}" data-parameters="">{{$lang.albums.related_albums_title_default}}</a></li>
        {{/if}}

        {{if count($storage.album_view_album_view.models)>0}}
            {{assign var="models_title" value=$lang.albums.related_albums_title_by_model|replace:"%1%":$storage.album_view_album_view.models[0].title}}
            {{if count($storage.album_view_album_view.models)>1}}
                {{assign var="models_title" value=$lang.albums.related_albums_title_by_models|replace:"%1%":$storage.album_view_album_view.models[0].title|replace:"%2%":$storage.album_view_album_view.models[1].title}}
            {{/if}}
            {{if $related_mode==4}}
                <li><span>{{$models_title}}</span></li>
            {{else}}
                <li><a data-action="ajax" data-container-id="{{$block_uid}}_filter_list" data-block-id="{{$block_uid}}" data-parameters="mode_related:4">{{$models_title}}</a></li>
            {{/if}}
        {{/if}}

        {{if $storage.album_view_album_view.content_source.title!=''}}
            {{if $related_mode==3}}
                <li><span>{{$lang.albums.related_albums_title_by_sponsor|replace:"%1%":$storage.album_view_album_view.content_source.title}}</span></li>
            {{else}}
                <li><a data-action="ajax" data-container-id="{{$block_uid}}_filter_list" data-block-id="{{$block_uid}}" data-parameters="mode_related:3">{{$lang.albums.related_albums_title_by_sponsor|replace:"%1%":$storage.album_view_album_view.content_source.title}}</a></li>
            {{/if}}
        {{/if}}
    </ul>
    {{assign var="list_albums_hide_headline" value="true"}}
    {{include file="include_list_albums_block_common.tpl"}}
</div>.

 

 

But I want to show related Albums "Vertical"  

What should I add or change in this code?

Thank you very much

Link to comment
Share on other sites

  • 2 years later...

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.

Guest
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...