entelechy
Active member
When you create a resource through resource manager, a resource and a thread are both created, and can be accessed by the "overview" and "discussion" tabs.
{{ link('resources', $resource) }} is used on the "overview" tab, but how can I get the $resource on the /forums/ page one level up from the resource itself by using the $thread that corresponds to it.
I'm trying to edit the button that selects a resource to load the overview by default instead of the discussion, and am modifying this link within the thread_list_macros template:
<a href="{{ link('threads' . (($thread.isUnread() AND !$forceRead) ? '/unread' : ''), $thread) }}" class="" data-tp-primary="on" data-xf-init="{{ $canPreview ? 'preview-tooltip' : '' }}" data-preview-url="{{ $canPreview ? link('threads/preview', $thread) : '' }}">{$thread.title}</a>
{{ link('resources', $resource) }} is used on the "overview" tab, but how can I get the $resource on the /forums/ page one level up from the resource itself by using the $thread that corresponds to it.
I'm trying to edit the button that selects a resource to load the overview by default instead of the discussion, and am modifying this link within the thread_list_macros template:
<a href="{{ link('threads' . (($thread.isUnread() AND !$forceRead) ? '/unread' : ''), $thread) }}" class="" data-tp-primary="on" data-xf-init="{{ $canPreview ? 'preview-tooltip' : '' }}" data-preview-url="{{ $canPreview ? link('threads/preview', $thread) : '' }}">{$thread.title}</a>