Link on image in article list

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
User avatar
swisscheese
Posts: 138
Joined: Mon 19. Feb 2007, 16:37
Location: Solothurn, Schweiz

Link on image in article list

Post by swisscheese »

Hi all

How can I put a link on a image in the article summary list? In a contentpart "text with image" on can fill out the image capture like this "text|title|url", but that doen't work in the article header section...

or am I missing something :?:

Waiting for a :idea:


Thanks
swisscheese
rushclub
Posts: 915
Joined: Tue 17. Feb 2004, 18:52

Re: Link on image in article list

Post by rushclub »

swisscheese wrote:Hi all

How can I put a link on a image in the article summary list? In a contentpart "text with image" on can fill out the image capture like this "text|title|url", but that doen't work in the article header section...

or am I missing something :?:

Waiting for a :idea:


Thanks
swisscheese
choose a different list-template for the article and then edit the custom template.

chears
rush
3 (!) Jahre warten reichen mir. Ich bin erst mal weg.
User avatar
swisscheese
Posts: 138
Joined: Mon 19. Feb 2007, 16:37
Location: Solothurn, Schweiz

Re: Link on image in article list

Post by swisscheese »

Thanx for help, rush!
rushclub wrote:... and then edit the custom template.
I guess you meen the /template/inc_cntpart/articlesummary/list/sample.tmpl , correct?
But what exactly do I put between the [IMAGE][/IMAGE] part?

btw: I'm on 1.3.3
swisscheese
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

a quick workaround could be, to put the link into the image-caption... :?: :!:

image-caption [ID alias]link to alias[/ID]|alt-text


where alias is the ALIAS-name of your category
rushclub
Posts: 915
Joined: Tue 17. Feb 2004, 18:52

Re: Link on image in article list

Post by rushclub »

swisscheese wrote:Thanx for help, rush!
rushclub wrote:... and then edit the custom template.
I guess you meen the /template/inc_cntpart/articlesummary/list/sample.tmpl , correct?
But what exactly do I put between the [IMAGE][/IMAGE] part?

btw: I'm on 1.3.3
swisscheese
look how the "more"-link is been generated in sample.tmpl.
simply copy and paste the href informations.

rush
3 (!) Jahre warten reichen mir. Ich bin erst mal weg.
User avatar
swisscheese
Posts: 138
Joined: Mon 19. Feb 2007, 16:37
Location: Solothurn, Schweiz

Post by swisscheese »

Thanks both, pepe and rush

The {ARTICLELINK} is giving me a link to the full render article. But I want a link coming from the caption entered for the image. The [ID] or the [EXT] RT is working, but then the link is on the caption text, not on the image.

have a look at this page . Scroll to the "Atlantis" logo and click on it. Nothing happens :cry: It should bring you to a external site.
For sure I could take a content part for each sponsor. But the advantage of article is that it's sorting alphabetically and (as they are paying an annual fee) the article can have a end time 8)

Hoping my problem is exactly described now and hoping there is a answer, as I'm an optimist, :wink:

swisscheese
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post by Jensensen »

there's NO link on your list images!!!!

Code: Select all

	[IMAGE]
	<div class="imgDIVinTextLeft">
		<div class="imagetd"><a href="{ARTICLELINK}">{IMAGE}</a></div>
	[CAPTION]<p class="imagecaption">{CAPTION}</p>[/CAPTION]
	</div><!-- /image -->[/IMAGE]
greetz
jensensen
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
swisscheese
Posts: 138
Joined: Mon 19. Feb 2007, 16:37
Location: Solothurn, Schweiz

Post by swisscheese »

Jensensen wrote:there's NO link on your list images!!!!
Yes of course, that's the problem and that's why I'm writing this thread :lol:

My article_summary_list.tmpl looks like this:

Code: Select all

[SPACE]<!-- space //-->[/SPACE]
<div class="phpwcmsArticleListEntry">
	[IMAGE]<div class="phpwcmsArticleListImage">
		[ARTICLELINK]<a href="{ARTICLELINK}">[/ARTICLELINK]{IMAGE}[ARTICLELINK]</a>[/ARTICLELINK]
		[CAPTION]<div class="phpwcmsArticleListImageCaption">{CAPTION}</div>[/CAPTION]
	</div>[/IMAGE]
	[TITLE]<h1>{TITLE}</h1>
[/TITLE][SUB]	<h3>{SUB}</h3>
[/SUB][SUMMARY]	<div>{SUMMARY}</div>
[/SUMMARY][MORE]	<div class="phpwcmsArticleListMore"><a href="{ARTICLELINK}">{MORE}</a></div>[/MORE]
</div>
In my article header information, I put a image for the article listing, and in the caption I write this:

Code: Select all

||http://www.blablabla.ch
So this should give me a linked image to that URL, or not??! :(

Or is this not possible?
swisscheese
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Mhhh, I am not shure, but please make a test and fill in:

Code: Select all

[IMAGE]<div class="phpwcmsArticleListImage">
		<a href="{ARTICLELINK}">{IMAGE}</a>
		[CAPTION]<div class="phpwcmsArticleListImageCaption">{CAPTION}</div>[/CAPTION]
	</div>[/IMAGE]
Use the image: article detail
caption:

Code: Select all

caption|alt|http://example.com _blank|title
Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
swisscheese
Posts: 138
Joined: Mon 19. Feb 2007, 16:37
Location: Solothurn, Schweiz

Post by swisscheese »

Thanx flip-flop, but sorry: no-go

Now the image has a link to the same page. If I check the "more link", there is a link to the article detail (however there is no more content in this case...)

Any ideas?
swisscheese
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Code: Select all

[SPACE]<!-- space //-->[/SPACE]
<div class="phpwcmsArticleListEntry">
	[IMAGE]<div class="phpwcmsArticleListImage">
		<a href="{ARTICLELINK}">{IMAGE}</a>
		[CAPTION]<div class="phpwcmsArticleListImageCaption">{CAPTION}</div>[/CAPTION]
	</div>[/IMAGE]
	[TITLE]<h1>{TITLE}</h1>
[/TITLE][SUB]	<h3>{SUB}</h3>
[/SUB][SUMMARY]	<div>{SUMMARY}</div>
[/SUMMARY][MORE]	<div class="phpwcmsArticleListMore"><a href="{ARTICLELINK}">{MORE}</a></div>[/MORE]
</div>
Use the image: article detail
Have you do this?
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
swisscheese
Posts: 138
Joined: Mon 19. Feb 2007, 16:37
Location: Solothurn, Schweiz

Post by swisscheese »

flip-flop wrote:Have you do this?
But Yes!!! 8)

And it doen't work on the listing! It only works in the article detail :cry:
So people would have to click on the image to get the full article (although there is no more details in this case), just to click on the image again to finally get to the desired url.. hmmm... :roll:

swisscheese
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post by Jensensen »

no article summary BUT --> LISTING??!!

so edit your templates as described,

and save in
/template/inc_cntpart/articlesummary/list/MY_TEMPLATE.tmpl

NOT
/template/inc_cntpart/articlesummary/article/...


and chose template for LISTING seperatly...

greetz
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

I have tested and it don´t work. Sorry.
I think without a core patch there is no chance.

We mustn´t use the placeholder {ARTICLELINK}.
But there is no alternative placeholder.
The list function ignores the url input at caption in contrast to the summary function.

Knut :oops:
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
swisscheese
Posts: 138
Joined: Mon 19. Feb 2007, 16:37
Location: Solothurn, Schweiz

Post by swisscheese »

flip-flop wrote:I have tested and it don´t work. Sorry.
I think without a core patch there is no chance.
Thanks very much knut! I was already sunken in self-doubts. Shortly before weekend, this could have been dangerous and leading in excessive consumption of beer and heavier stuff... :lol:

So, I'll search for a workaround instead.

Thanks and greetz
swisscheese
Post Reply