Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 Today 01:28:09

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,282
Website Mastodon

Link to full article

brain fog has hit me – yet again.
I cannot work out how to get to a full article from a brief output.

In my Notebook section I output three articles …. title and image and category and date.
From here I wish to link to the full Notebook article. But all I get is a hung browser:

In my Page: Notebook I call for three items:

<txp:article_custom form="notebook" limit="3" sort="posted desc" />

In the Form (Article) : notebook I have :

 <txp:article_image class="img-fluid" alt=""/>  
              <div class="meta-top">
                 <ul>
       <li class="d-flex align-items-center"> <txp:category /></li>
       <li class="d-flex align-items-center"><i class="bi bi-dot"></i> <txp:posted format="%b %d, %Y" /></li>
                 </ul>
               </div>
  <h2 class="title"> <txp:permlink><txp:title /></txp:permlink></h2> 
             </article>
           </div><!-- End post list item -->
 <!--  works as expected  BUT PERMLINK not working  -->

when I hover over the permalink I see the URL I expect http://piovedue.local/notebook/using-grep-to-find-caps
But all I get is a hung browser that fails to reach the url.

in the Form (Article) : notebook_listing I have:

 <section id="note-details" class="note-details section"> 
	<div class="container">
	  <article class="article">
		<div class="post-img">
 <txp:article_image wraptag="p" alt="" class="img-fluid"/>
		</div>
<txp:permlink><h2 class="title"><txp:title /></h2> </txp:permlink>
		<div class="meta-top">
		  <ul>
			<li class="d-flex align-items-center"><i class="bi bi-clock"></i> 
<txp:permlink> <txp:title /> </txp:permlink> &nbsp <txp:posted format="%b %d, %Y" /></li>
		  </ul>
		</div><!-- End meta top -->
		<div class="content">
		   <txp:body />  
<txp:if_excerpt>
        <div itemprop="description">
            <txp:excerpt />
        </div>
    </txp:if_excerpt>
		</div><!-- End post content -->
	  </article>
	</div>
  </section><!-- /Blog Details Section -->
<!-- ==== /POST FULL NOTEBOOK ARTICLE ==== -->

I am sure there must be something trivial and obvious that I am overlooking. A fresh set of eyes might help…


…. texted postive

Offline

#2 Today 09:06:40

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,229
Website GitHub

Re: Link to full article

Except for a bit of missing markup that you probably just didn’t copy and paste, your txp:permlink use in your notebook form looks okay, and you say it’s showing you the correct url.

Once you’ve been redirected, the form doesn’t play a role any more. The notebook_listing won’t be relevant here, but might be on the page you land at.

What happens if you paste the link into the browser manually? Does it work? If not, visit the page using the link in the admin-side write tab and if it shows correctly, compare what it is different between the two urls? Other possible reasons: maybe your notebook section is a pageless section (check in Presentation › Sections)?


TXP Builders – finely-crafted code, design and txp

Offline

#3 Today 10:14:00

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,502
Website GitHub

Re: Link to full article

A hung browser might indicate you have an infinite loop. I had something similar the other day where an article used the default form which fetched a bunch of <txp:article_custom> articles… which used the default form…

So double check your page logic isn’t using the same nested form multiple times, as it’s easy to tie yourself in knots with article_custom.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB