Neler yeni

Foruma hoş geldin 👋, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

  • Forumdan daha fazla yararlanmak için, profilinizi telefon numaranız 📱 ile doğrulayın ve daha ayrıcalıklı olun 😉
    Daha fazla bilgi!

Nasıl yapılır ? $node.node_id Alternatifler Nedir

TheHypnosis

xFanatik
SMS onaylı
Kullanıcı
Katılım
6 Haz 2019
Mesajlar
288
Çözümler
3
Untitled.png

En Altta Olması Gerek Bu Yuzden $node.node_id kullandım fakat şöyle bir durum var her katagori açtığımda ben bunu değiştirmek kodlardan istemiyorum otamatik olarak en altta olması için ya property uygulayacağım fakat alttaki id numarasına property 'i uygulayamadım netr0n netr0n @LaDezs eTiKeT™ eTiKeT™ @Ugur yardımcı olurmusunuz
Kod:
<xf:if is="{$node.node_id} == 2">
 
En alt kısımda göstermek için node değişkenine neden ihtiyaç duyduğunuzu anlamadım.
 
En alt kısımda göstermek için node değişkenine neden ihtiyaç duyduğunuzu anlamadım.

Hayir sadece en alttaki katagori altinda gozukmesi icin o katagori id i yazdim.

Bunun farkli yolu varmi veya property ekleyip oradan id degistirme yapmak icin node id ye nasil müdahil edebilirim
 
Hayir sadece en alttaki katagori altinda gozukmesi icin o katagori id i yazdim.

Bunun farkli yolu varmi veya property ekleyip oradan id degistirme yapmak icin node id ye nasil müdahil edebilirim
Anladığım kadarıyla forum listesinin altında göstermek istiyorsunuz. Bunun için forum_list şablonunda en alta eklemeyi denediniz mi?
 
Anladığım kadarıyla forum listesinin altında göstermek istiyorsunuz. Bunun için forum_list şablonunda en alta eklemeyi denediniz mi?

Sorun eklenecek yer değil
Ben her yeni katagori olusturdugumda
<xf:if is="{$node.node_id} == 2">

Degistirmek zorunda kalicam bu sebepden dolayi buna property ekleyip number ile müdahale etmek ama buraya müdahale edemiyorum 2">

veya farkli bir yolu varmi sadece en alt forumda olusmasi icin alternatif
 
Dediğim gibi ben forum_list şablonuna ekledim oldu

Örnek:

En alttaki bu kodu ekledim.

<style>
.block--category:last-child {margin:0px;}
</style>

<ul class="foot">
<li>
<a href="{{ link('forums/mark-read', '-', {'date': $xf.time}) }}">Forumları Okundu Say</a>
<a href="{{ link('members', null, {'key': 'staff_members'}) }}">{{ phrase('member_stat.staff_members') }}</a>
</li>
</ul>

Kod:
<xf:if is="$xf.options.forumsDefaultPage != 'forums' OR ($xf.options.indexRoute AND $xf.options.indexRoute != 'forums/')">
    <xf:title>{{ phrase('forum_list') }}</xf:title>
<xf:else />
    <xf:h1>{$xf.options.boardTitle}</xf:h1>
</xf:if>

<xf:page option="sidebarPos">{{ property('nlSidebarPosForums') }}</xf:page>

<xf:macro template="metadata_macros" name="metadata"
    arg-description="{$xf.options.boardDescription}"
    arg-canonicalUrl="{{ link('canonical:' . $selfRoute) }}" />


<xf:wrap template="forum_overview_wrapper">
    <xf:set var="$pageSelected">forums</xf:set>
</xf:wrap>

<xf:widgetpos id="forum_list_sidebar" position="sidebar" />

<div id="nodeList" class="nodeList">
<xf:widgetpos id="forum_list_above_nodes" />
<xf:macro name="node_list" arg-children="{$nodeTree}" arg-extras="{$nodeExtras}" />
<xf:widgetpos id="forum_list_below_nodes" />
</div>

<xf:head option="rss_forum"><link rel="alternate" type="application/rss+xml" title="{{ phrase('rss_feed_for_x', {'title': $xf.options.boardTitle})|for_attr }}" href="{{ link('forums/index.rss', '-') }}" /></xf:head>

<xf:macro name="node_list_entry" arg-node="!" arg-extras="!" arg-children="!" arg-childExtras="!" arg-depth="1">
    <xf:css src="node_list.less" />
    <xf:set var="$nodeTemplate" value="{{ $node.getNodeTemplateRenderer($depth) }}" />
    <xf:if is="$nodeTemplate.macro">
        <xf:macro template="{$nodeTemplate.template}" name="{$nodeTemplate.macro}"
            arg-node="{$node}"
            arg-extras="{$extras}"
            arg-children="{$children}"
            arg-childExtras="{$childExtras}"
            arg-depth="{$depth}" />
    <xf:elseif is="{$nodeTemplate.template}" />
        <xf:include template="{$nodeTemplate.template}" />
    </xf:if>
</xf:macro>

<xf:macro name="node_list" arg-children="!" arg-extras="!" arg-depth="1">
    <xf:css src="node_list.less" />
    <xf:foreach loop="$children" key="$id" value="$child">
        <xf:macro name="node_list_entry"
            arg-node="{$child.record}"
            arg-extras="{$extras.{$id}}"
            arg-children="{$child.children}"
            arg-childExtras="{$extras}"
            arg-depth="{$depth}" />
    </xf:foreach>
</xf:macro>

<xf:macro name="sub_node_list" arg-children="!" arg-childExtras="!" arg-depth="3">
    <xf:if contentcheck="true">
        <ol>
        <xf:contentcheck>
            <xf:macro template="forum_list" name="node_list"
                arg-children="{$children}"
                arg-extras="{$childExtras}"
                arg-depth="{{ $depth + 1 }}" />
        </xf:contentcheck>
        </ol>
    </xf:if>
</xf:macro>

<xf:macro name="sub_nodes_flat" arg-children="!" arg-childExtras="!" arg-depth="3">
    <xf:css src="node_list.less" />
    <xf:if contentcheck="true">
        <div class="node-subNodesFlat">
            <span class="node-subNodesLabel">{{ phrase('sub_forums:') }}</span>
            <ol class="node-subNodeFlatList">
            <xf:contentcheck>
                <xf:macro template="forum_list" name="node_list"
                    arg-children="{$children}"
                    arg-extras="{$childExtras}"
                    arg-depth="{{ $depth + 1 }}" />
            </xf:contentcheck>
            </ol>
        </div>
    </xf:if>
</xf:macro>

<xf:macro name="sub_nodes_menu" arg-children="!" arg-childExtras="!" arg-depth="3">
    <xf:css src="node_list.less" />
    <xf:if contentcheck="true">
        <div class="node-subNodeMenu">
            <a class="menuTrigger" data-xf-click="menu" role="button" tabindex="0" aria-expanded="false" aria-haspopup="true">{{ phrase('sub_forums') }}</a>
            <div class="menu" data-menu="menu" aria-hidden="true">
                <div class="menu-content">
                    <h4 class="menu-header">{{ phrase('sub_forums') }}</h4>
                    <ol class="subNodeMenu">
                    <xf:contentcheck>
                        <xf:macro template="forum_list" name="node_list"
                            arg-children="{$children}"
                            arg-extras="{$childExtras}"
                            arg-depth="{{ $depth + 1 }}" />
                    </xf:contentcheck>
                    </ol>
                </div>
            </div>
        </div>
    </xf:if>
</xf:macro>
<style>
    .block--category:last-child {margin:0px;}
</style>

<ul class="foot">
    <li>
    <a href="{{ link('forums/mark-read', '-', {'date': $xf.time}) }}">Forumları Okundu Say</a>
    <a href="{{ link('members', null, {'key': 'staff_members'}) }}">{{ phrase('member_stat.staff_members') }}</a>
    </li>
</ul>
 
Dediğim gibi ben forum_list şablonuna ekledim oldu

Örnek:

En alttaki bu kodu ekledim.

<style>
.block--category:last-child {margin:0px;}
</style>

<ul class="foot">
<li>
<a href="{{ link('forums/mark-read', '-', {'date': $xf.time}) }}">Forumları Okundu Say</a>
<a href="{{ link('members', null, {'key': 'staff_members'}) }}">{{ phrase('member_stat.staff_members') }}</a>
</li>
</ul>

Kod:
<xf:if is="$xf.options.forumsDefaultPage != 'forums' OR ($xf.options.indexRoute AND $xf.options.indexRoute != 'forums/')">
    <xf:title>{{ phrase('forum_list') }}</xf:title>
<xf:else />
    <xf:h1>{$xf.options.boardTitle}</xf:h1>
</xf:if>

<xf:page option="sidebarPos">{{ property('nlSidebarPosForums') }}</xf:page>

<xf:macro template="metadata_macros" name="metadata"
    arg-description="{$xf.options.boardDescription}"
    arg-canonicalUrl="{{ link('canonical:' . $selfRoute) }}" />


<xf:wrap template="forum_overview_wrapper">
    <xf:set var="$pageSelected">forums</xf:set>
</xf:wrap>

<xf:widgetpos id="forum_list_sidebar" position="sidebar" />

<div id="nodeList" class="nodeList">
<xf:widgetpos id="forum_list_above_nodes" />
<xf:macro name="node_list" arg-children="{$nodeTree}" arg-extras="{$nodeExtras}" />
<xf:widgetpos id="forum_list_below_nodes" />
</div>

<xf:head option="rss_forum"><link rel="alternate" type="application/rss+xml" title="{{ phrase('rss_feed_for_x', {'title': $xf.options.boardTitle})|for_attr }}" href="{{ link('forums/index.rss', '-') }}" /></xf:head>

<xf:macro name="node_list_entry" arg-node="!" arg-extras="!" arg-children="!" arg-childExtras="!" arg-depth="1">
    <xf:css src="node_list.less" />
    <xf:set var="$nodeTemplate" value="{{ $node.getNodeTemplateRenderer($depth) }}" />
    <xf:if is="$nodeTemplate.macro">
        <xf:macro template="{$nodeTemplate.template}" name="{$nodeTemplate.macro}"
            arg-node="{$node}"
            arg-extras="{$extras}"
            arg-children="{$children}"
            arg-childExtras="{$childExtras}"
            arg-depth="{$depth}" />
    <xf:elseif is="{$nodeTemplate.template}" />
        <xf:include template="{$nodeTemplate.template}" />
    </xf:if>
</xf:macro>

<xf:macro name="node_list" arg-children="!" arg-extras="!" arg-depth="1">
    <xf:css src="node_list.less" />
    <xf:foreach loop="$children" key="$id" value="$child">
        <xf:macro name="node_list_entry"
            arg-node="{$child.record}"
            arg-extras="{$extras.{$id}}"
            arg-children="{$child.children}"
            arg-childExtras="{$extras}"
            arg-depth="{$depth}" />
    </xf:foreach>
</xf:macro>

<xf:macro name="sub_node_list" arg-children="!" arg-childExtras="!" arg-depth="3">
    <xf:if contentcheck="true">
        <ol>
        <xf:contentcheck>
            <xf:macro template="forum_list" name="node_list"
                arg-children="{$children}"
                arg-extras="{$childExtras}"
                arg-depth="{{ $depth + 1 }}" />
        </xf:contentcheck>
        </ol>
    </xf:if>
</xf:macro>

<xf:macro name="sub_nodes_flat" arg-children="!" arg-childExtras="!" arg-depth="3">
    <xf:css src="node_list.less" />
    <xf:if contentcheck="true">
        <div class="node-subNodesFlat">
            <span class="node-subNodesLabel">{{ phrase('sub_forums:') }}</span>
            <ol class="node-subNodeFlatList">
            <xf:contentcheck>
                <xf:macro template="forum_list" name="node_list"
                    arg-children="{$children}"
                    arg-extras="{$childExtras}"
                    arg-depth="{{ $depth + 1 }}" />
            </xf:contentcheck>
            </ol>
        </div>
    </xf:if>
</xf:macro>

<xf:macro name="sub_nodes_menu" arg-children="!" arg-childExtras="!" arg-depth="3">
    <xf:css src="node_list.less" />
    <xf:if contentcheck="true">
        <div class="node-subNodeMenu">
            <a class="menuTrigger" data-xf-click="menu" role="button" tabindex="0" aria-expanded="false" aria-haspopup="true">{{ phrase('sub_forums') }}</a>
            <div class="menu" data-menu="menu" aria-hidden="true">
                <div class="menu-content">
                    <h4 class="menu-header">{{ phrase('sub_forums') }}</h4>
                    <ol class="subNodeMenu">
                    <xf:contentcheck>
                        <xf:macro template="forum_list" name="node_list"
                            arg-children="{$children}"
                            arg-extras="{$childExtras}"
                            arg-depth="{{ $depth + 1 }}" />
                    </xf:contentcheck>
                    </ol>
                </div>
            </div>
        </div>
    </xf:if>
</xf:macro>
<style>
    .block--category:last-child {margin:0px;}
</style>

<ul class="foot">
    <li>
    <a href="{{ link('forums/mark-read', '-', {'date': $xf.time}) }}">Forumları Okundu Say</a>
    <a href="{{ link('members', null, {'key': 'staff_members'}) }}">{{ phrase('member_stat.staff_members') }}</a>
    </li>
</ul>

netr0n netr0n eTiKeT™ eTiKeT™
Malesef Öncelikle Eklenmesi Gereken Yer Node_List_Category 'de Block-Body Altı Olmalı Neyse Biraz Yanlış Anlaşıldı Galiba
<xf:if is="{$node.node_id} == 3"> ben temaya property olarak ekledim ama buradaki İd==3 olan kısmı oradan değiştirsem yeterli yapacak birşey yok
 

Foruma hoş geldin 👋, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.