ninja template issue

soaringeagle
@soaringeagle
5 years ago
3,304 posts
the "latest group discussions' on the front page is mixed up, with both references to group discussions, and music
{* This is the embedded template that is shown for EACH latest song entry *}
{capture name="template6" assign="groupdiscuss_tpl"}
{literal}
    {if isset($_items)}
    {jrCore_module_url module="jrGroupDiscuss" assign="aurl"}
    {foreach $_items as $item}
    <div class="container">

        <div class="row">
            <div class="col2">
                <div class="block_image" style="min-height:48px">
                    <a href="{$jamroom_url}/{$item._group_data.profile_url}/{$aurl}/{$item._item_id}/{$item.discuss_title_url}">{jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$item._user_id size="large" crop="auto" class="img_scale" alt=$item.user_name width=false height=false _v=$item._updated}</a>

                </div>
            </div>
            <div class="col10 last">
                <div class="p5">
                    <h4><a href="{$jamroom_url}/{$item._group_data.profile_url}/{$aurl}/{$item._item_id}/{$item.discuss_title_url}">{$item.discuss_title|truncate:25}</a></h4>
                </div>
            </div>
        </div>

    </div>
    {/foreach}
    {else}
    <div class="center p10">
        <h3>{jrCore_lang skin="jrNinja" id="26" default="No"} {jrCore_lang skin="jrNinja" id="19" default="Music"} {jrCore_lang skin="jrNinja" id="41" default="Submitted"}!</h3>
    </div>
    {/if}
{/literal}
{/capture}
{* This is the END of the embedded template that is shown for EACH latest song entry *}


<div class="blog-index-text" style="margin: 10px 0 0 0;padding-bottom: 10px;{if !jrCore_is_mobile_device()}height:240px;{/if}overflow:hidden;">
    {jrCore_list module="jrGroupDiscuss" order_by="_created desc" limit="5" template=$groupdiscuss_tpl}
</div>



--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 12/23/19 08:45:24PM
paul
@paul
5 years ago
4,326 posts
Thanks. It looks like a bad case of copy, paste, then don't edit properly ;-)
We'll get that fixed up.
I assume the actual code created is ok and that listed discussions don't have any music references in them?


--
Paul Asher - JR Developer and System Import Specialist
soaringeagle
@soaringeagle
5 years ago
3,304 posts
from the code im guessing so except the aurl maybe assigned to wrong module
its a new site no content so cant be certain yet


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
paul
@paul
5 years ago
4,326 posts
Have just tried this and the code created looks ok.
'$aurl' is just a variable used in the template and not particular to the Audio module, and as $aurl is used throughout the same template, it will be ok.
The only uses of 'song' instead of 'discussion' I can see are in comments so again, not affecting any code generation, but there is the "default='Music'" instead of 'Discussion' in a language call that I'll get fixed up.
Thanks for letting us know about this.


--
Paul Asher - JR Developer and System Import Specialist
soaringeagle
@soaringeagle
5 years ago
3,304 posts
thnx for the fast response


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

Tags