XF 1.5 Display Strings in Page Node to HTML OR Display XFMG Block in Custom Page

trapped_soul

Well-known member
Hi,
Am trying to get the XFMG Block widget into a custom page node.
Currently I have used this and it's great but the thumbs are quite small and the padding in the container on mobile is quite big;
https://xenforo.com/community/resou...media-block-to-a-sidebar-or-portal-page.3793/

So I have looked at the code for the default block and in the template have found this;
Code:
<xen:if is="{$canViewMedia}">
    <xen:if hascontent="true">
        <xen:require js="{xen:helper xmgjs, 'media_slider.js'}" />
            <xen:require css="xengallery_media_block.css" />
           
        <div style="display: none;" class="{xen:if '{$isSidebarBlock}', 'section ', ''}xmgCarouselContainer {xen:string strtolower, $visitorLanguage.text_direction}">
            <div class="{xen:if '{$isSidebarBlock}', 'secondaryContent', 'sectionMain'}">
                <div class="titleStrip">
                    <h3><a href="{xen:if '{$xenOptions.xengalleryRecentMediaOrder} == "new"', '{xen:link find-new/media}', '{xen:link xengallery}'}" class="blockTitle" rel="nofollow">{$blockPhrase}</a></h3>
                </div>
                <div class="XmgCarousel" id="{$blockId}"
                    data-items="{$items}"
                    data-direction="{xen:string strtolower, $visitorLanguage.text_direction}"
                    data-slide-width="{$slideWidth}"
                    data-responsive-wide="{$wide}"
                    data-responsive-medium="{$medium}"
                    data-responsive-narrow="{$narrow}"
                    data-navigation="{xen:if $xmgBlockNav, $xmgBlockNav, @xengalleryForumListBlockNav}"
                    data-captions="{$captions}" data-target="#{$blockId}"
                    data-responsive="{xen:if '{$noResponsive} || {$isSidebarBlock}', 0, 1}"
                >

                    <xen:contentcheck>
                        <xen:callback class="XenGallery_Callback" method="getMediaForBlock" params="{xen:array 'type={$type}', 'limit={xen:if $limit, $limit, 5}', 'categories={$categories}', 'albums={$albums}', 'captions={$captions}'}" />
                    </xen:contentcheck>
                </div>
            </div>
        </div>
    </xen:if>
</xen:if>

But it throws errors, most likely due to this;
Code:
                <div class="XmgCarousel" id="{$blockId}"
                    data-items="{$items}"
                    data-direction="{xen:string strtolower, $visitorLanguage.text_direction}"
                    data-slide-width="{$slideWidth}"
                    data-responsive-wide="{$wide}"
                    data-responsive-medium="{$medium}"
                    data-responsive-narrow="{$narrow}"
                    data-navigation="{xen:if $xmgBlockNav, $xmgBlockNav, @xengalleryForumListBlockNav}"
                    data-captions="{$captions}" data-target="#{$blockId}"
                    data-responsive="{xen:if '{$noResponsive} || {$isSidebarBlock}', 0, 1}"
                >

So is there a way to get the exact block showing on custom pages/page nodes and/or is there a way to edit this to work so we can get it displaying?
It's actually harder than what I initially thought..

Thanks in advance for any help you can offer.
 

S Thomas

Well-known member
Could you numerate the lines and post the error aswell? It should tell you what line is causing the trouble.
 
Top