Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Output a custom article as a footer form
I wish to have the footer area of a section be output using a Form. The section has many articles so the footer has to remain constant. In effect I wish to have snippet of text, but that is user editable from an Article, and that can be used on more than one occasion… ie in the Contact page as some text, and in a footer as differently styled text.
This code, only outputs the article once as a footer and going to the next article in the list fails to show the footer content. why?
<txp:if_article_list>
<txp:article_custom id="11" form="portfolio_footer" />
</txp:if_article_list>
the form has this:
<p class="cta__teaser"> <txp:body escape="tidy, p" /> </p>
<a href="https://textism.ca/contact" class="btn btn--wide btn--mobile-block"><txp:excerpt escape="tidy, p" /> </a>
.
…. texted postive
Offline
Re: Output a custom article as a footer form
I am not clear what you are doing. Your code snippet (<txp:if_article_list>) indicates that you are using it to insert a bit of text (article) on list pages, but not on individual article pages. But then you state you navigate from one article to the next.
You code works fine for list (landings) pages, e.g. your “portfolio“ section, btw
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Output a custom article as a footer form
Yes, if you want it on every page in the section, as phiw13 says, ditch the <txp:if_article_list>.
There are other ways to pull the content in and manage it. You could also create a pageless section, for example, so the article itself won’t ever be output by mistake via the URL.
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
Re: Output a custom article as a footer form
Bloke wrote #342130:
You could also create a pageless section, for example, so the article itself won’t ever be output by mistake via the URL.
w00t! —- Pageless in Vancouver.
So I created by first pageless “page” … But is it a Page, or a Snippet of text, or Chunk of content, Includes, that can be used in various sections and other pages?
When I first read the blog post on this, it wasm’t clear how it could be used. Now I can see its uses.
Examples are always so much help to non-coders. The more the merrier.
Thanks for your sage help.
…. texted postive
Offline