Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-09-16 10:29:54

Viktor
Member
From: Nürnberg
Registered: 2008-09-12
Posts: 21
Website

Portfolio page

Hi,

I want to use Txp for my online portfolio. It works rather well but I’ve on problem with the portfolio section:
I want to have an overview of my work and a page with detailed information of a single work.

The overview is simple:

I call the excerpt and article image of an article through this form:

<div class="ref">
    <div class="text">
	<h3><txp:title /></h3>
	<txp:excerpt /><a href="<txp:article_url_title />">Mehr</a>
    </div>
<a class="link-img" href="<txp:article_url_title />"><txp:article_image class="ref-preview" /></a>
</div> .

This works very well and the article image links to “/australiss/” for example. But the section australiss isn’t available.

The article image shall link to the “complete” article (“portfolio/australiss/”), where all content is displayed, not only the excerpt and article image.

You can see the live example here: www.viktor-reiter.de/studio/portfolio/

I hope I’ve explained everything to understand my problem.

Last edited by Viktor (2008-09-16 11:13:27)

Offline

#2 2008-09-16 12:35:16

bancroft
Member
Registered: 2005-09-30
Posts: 39

Re: Portfolio page

Hi Viktor,

You could try href="<txp:permlink />" instead of href="<txp:article_url_title />"

Offline

#3 2008-09-16 14:12:23

Viktor
Member
From: Nürnberg
Registered: 2008-09-12
Posts: 21
Website

Re: Portfolio page

Yeah! Thanks!

Your tip hels on. Now I’ve got this page:
Link

Now I want not the excerpt to be displayed but the body of the article. How can I use another form for presentation, because the article uses also the “portfolio” section where I use now this tag:

<div class="ref">
    <div class="text">
	<h3><txp:title /></h3>
	<txp:excerpt /><a href="<txp:permlink />">Mehr</a>
    </div>		
     <a class="link-img" href="<txp:permlink />"> <txp:article_image class="ref-preview" /></a>
</div>

I want to display the article this way:

<div id="sidebar">
<h3><txp:title /></h3>
  <txp:body>
</div>
<div id="main">
  <txp:article_image/>
</div>

Offline

#4 2008-09-16 14:21:53

bancroft
Member
Registered: 2005-09-30
Posts: 39

Re: Portfolio page

This should do it:

<txp:if_article_list>

<div class="ref">
    <div class="text">
	<h3><txp:title /></h3>
	<txp:excerpt /><a href="<txp:permlink />">Mehr</a>
    </div>		
     <a class="link-img" href="<txp:permlink />"> <txp:article_image class="ref-preview" /></a>
</div>

<txp:else />

<div id="sidebar">
<h3><txp:title /></h3>
  <txp:body>
</div>
<div id="main">
  <txp:article_image/>
</div>

</txp:if_article_list>

Offline

#5 2008-09-16 16:14:18

Viktor
Member
From: Nürnberg
Registered: 2008-09-12
Posts: 21
Website

Re: Portfolio page

Now I’m using this code for the section template:

<txp:article form="portfolio" limit="5" pageby="5" pgonly="0" sort="Posted desc" status="4" allowoverride="1" />

with this form:

<txp:if_article_list>
<div class="ref">
    <div class="text">
	<h3><txp:title /></h3>
	<txp:excerpt />
    </div>
    <a class="link-img" href="<txp:permlink />"><txp:article_image class="ref-preview" /></a>
</div>
<txp:else />
<div id="sidebar">
  <h3><txp:title /></h3>
  <txp:body />
</div>
<div id="main">
  <txp:article_image class="ref-preview"/>
</div>
</txp:if_article_list>

It works rather well, but it seems that the code below isn’t rendered by textpattern, if you look at the source code of “the site:http://www.viktor-reiter.de/studio/portfolio/en-electronic-networks”:

<div id="main">
  <txp:article_image class="ref-preview"/>
</div>

If I paste the conditional tag directly into the section template, it occurs an tag error.

Live example

Thank you so far :)

Last edited by Viktor (2008-09-16 16:27:29)

Offline

#6 2008-09-16 16:21:54

bancroft
Member
Registered: 2005-09-30
Posts: 39

Re: Portfolio page

Hadn’t noticed it before but it’s more than likely <txp:body>, should be <txp:body />

Last edited by bancroft (2008-09-16 16:22:32)

Offline

#7 2008-09-16 16:33:13

Viktor
Member
From: Nürnberg
Registered: 2008-09-12
Posts: 21
Website

Re: Portfolio page

Oh you’re right. It’s fixed and works well. Now I have only to find a way to display more than one article image.

Offline

#8 2008-09-16 16:38:24

bancroft
Member
Registered: 2005-09-30
Posts: 39

Re: Portfolio page

Haven’t used it myself but you could try http://textpattern.org/plugins/455/hak_article_image

Offline

#9 2008-09-16 17:57:21

Viktor
Member
From: Nürnberg
Registered: 2008-09-12
Posts: 21
Website

Re: Portfolio page

You’re godlike. Thanks!

Offline

Board footer

Powered by FluxBB