[SOLVED] Listit2 Select File problems

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
chillifish
Forum Members
Forum Members
Posts: 92
Joined: Wed Jul 27, 2011 9:26 am

[SOLVED] Listit2 Select File problems

Post by chillifish »

I'm trying to link to a file with Listit2. The default template doesn't work, so I've tried doing it as below, however, the file doesn't appear. Can anyone tell me what I'm doing wrong? ???

Code: Select all

<!-- item -->
<div class="item">
	{if !empty($item->fielddefs)}
	<div class="item-properties">
			<span class="name">{$item->title}</span>
			{if !empty($item->qualifications)}
			<span class="qualifications">{$item->qualifications}</span>
			{/if}
			{if !empty($item->job_title)}
			<br />
			<span class="job-title">{$item->job_title}</span>
			{/if}
			{if !empty($item->m)}
			<br />
			<span class="mobile">M: {$item->m}</span>
			{/if}
			{if !empty($item->t)}
			<br />
			<span class="telephone">T: {$item->t}</span>
			{/if}
			{if !empty($item->e)}
			<br />
			<span class="email">E: {$item->e}</span>
			{/if}
			{if !empty($item->resume)}
			<br />
			<a href="{$fielddef->GetImagePath(true)}/{$fielddef.value}"><span class="resume">{$fielddef.value}</span></a>
			{/if}
	</div>
	{/if}
</div>
<!-- item //-->
Edited because I put in the default template by mistake.
Last edited by chillifish on Sat Mar 07, 2015 3:43 pm, edited 1 time in total.
chillifish
Forum Members
Forum Members
Posts: 92
Joined: Wed Jul 27, 2011 9:26 am

Re: Listit2 Select File problems

Post by chillifish »

This is working, but how do I get the path to the file?

Code: Select all

<!-- item -->
<div class="item">
	{if !empty($item->fielddefs)}
	<div class="item-properties">
			<span class="name">{$item->title}</span>
			{if !empty($item->qualifications)}
			<span class="qualifications">{$item->qualifications}</span>
			{/if}
			{if !empty($item->job_title)}
			<br />
			<span class="job-title">{$item->job_title}</span>
			{/if}
			{if !empty($item->m)}
			<br />
			<span class="mobile">M: {$item->m}</span>
			{/if}
			{if !empty($item->t)}
			<br />
			<span class="telephone">T: {$item->t}</span>
			{/if}
			{if !empty($item->e)}
			<br />
			<span class="email">E: {$item->e}</span>
			{/if}
			{if !empty($item->resume)}
			<br />
			<a href=""><span class="resume">{$item->resume}</span></a>
			{/if}
	</div>
	{/if}
</div>
<!-- item //-->
chillifish
Forum Members
Forum Members
Posts: 92
Joined: Wed Jul 27, 2011 9:26 am

Re: Listit2 Select File problems

Post by chillifish »

Tried the following after reading this, but doesn't work either:

Code: Select all

<a href="{$item->fielddefs.resume.dir}/{$item->resume}"><span class="resume">{$item->resume}</span></a>
chillifish
Forum Members
Forum Members
Posts: 92
Joined: Wed Jul 27, 2011 9:26 am

Re: Listit2 Select File problems

Post by chillifish »

Found my answer here.

Code: Select all

<a href="{uploads_url}/{$item->fielddefs.resume->GetOptionValue('dir')}/{$item->resume}"><span class="resume">{$item->resume}</span></a>
Post Reply

Return to “Modules/Add-Ons”