Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Navigation structure
Hi all,
I’m a new user and I was wondering how to setup my navigation in Textpattern.
This is what I want to achieve
Archieven
——————Provincie
———————————-Archieven (a page with linken for different archives)
—————————————————-Info page (discription/info over a certain archive)
Is this possible within Textpattern.
Offline
Re: Navigation structure
Hello, welcome to the forum.
Most navigation structures are totally possible with txp, but it is not quite clear what you want to construct: a menu tree, a breadcrumb (path), an article URL? Is it an isolated case, or you need some kind of automation for multiple sections of your site?
Offline
Re: Navigation structure
Okay, I’ll try to explain it better. I want to create a menu on the left side of the website. One item in this menu will be, for example, “Archives.” When visitors click on this, two things will happen. To the right of the menu, an article will open with a brief explanation of this item. There will also be links in the menu under Archives, multiple menu items that are sub-items of Archives. When you click on one of these sub-links, another article opens next to the menu, this time containing web links to specific archives. When you click on one of these links in this article, another article opens containing all the information about that particular article. My question is: can I build this menu structure in Textpattern, and how do I structure my articles in the backend?
Offline
Re: Navigation structure
Hi peter, and welcome to txp.
Before digging into your query would it be OK if we speak about structure and taxonomy?
Txp navigation can be built by hand or dynamically. Whatever it is, you will need to decide what will the structure of your site be and how large you plan this site to become… ie if you plan to have many articles in the depth of time, or if you already know that it will be a fine number of articles.
If you plan for a finite number of articles, which is possibly not the case as you mentioned the word Archives twice in your request, then all you need is a custom, hand written menu, but if you plan to have many articles a category menu, an old example of which can be found on textpattern.tips/categories-navigation-menu-with-consistent-urls could be can be of help.
The next step will be to build what the landing page of each category will be, but before we go there, we’d like to know more of the planned content of your site in order to help you properly.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Navigation structure
I’m currently setting up a website for people involved in genealogy/family tree research, specifically aimed at Dutch users. The website will be offered exclusively in Dutch. Visitors will find information on everything related to genealogy, including: – Explanations of various software packages (functionalities, support, user-friendliness, etc.) – Archives (where to find a specific archive, a brief explanation of what can be found in that archive, etc.) – AI Tools (e.g., Transkribus, Facial Recognition; are there other AI tools already available, could AI play a larger role in family tree research in the future, etc.) – Pitfalls (what to watch out for to avoid errors) – etc. The Archives section will consist of 12 pages, and each of these 12 pages will be expanded by at least 1 page, up to a maximum of 3 pages. The Software section will become even larger than the Archives section. More of these sections will be added over time.
Offline
Re: Navigation structure
Okay, based on your description, here is a minimal template. I’d just warn you that txp is a kind of lego, there is not many out of the box constructions, but you can assemble various elements to construct almost everything. So:
- Create few Sections (
Software,Archives, etc) - Create correspondingly named article Categories (
Software,Archives, etc) - Create sub-Categories of each Category as needed
- Publish some articles in each Section, assigning them to various sub-Categories
Now the following construction (put, say, in some article for testing) should get you started:
<txp:section_list wraptag="div" break="details">
<summary><a href="<txp:section url />" target="content"><txp:section title /></a></summary>
<txp:category_list parent='<txp:section />' wraptag="ul" break="li">
<a href="<txp:category url />" target="content"><txp:category title /></a>
</txp:category_list>
</txp:section_list>
<iframe name="content"></iframe>
I use html details and iframe here, but this is only for illustration purpose.
Offline
Re: Navigation structure
To display the first article, I’ve updated the “Welcome to Textpattern” article. This article should always be visible when a visitor visits the website. An exception, of course, is if the visitor arrives, for example, via a targeted Google search for a specific article. New articles should never be displayed on the homepage by default; the currently visible article is the only one allowed to be displayed. Do I need to take any further action to make this happen, or is it unnecessary? In Joomla, for example, I would need to make this a “Special Article.” I also saw the option of “sticky” in the backend, but I don’t think that will work for this. Is this correct?
Offline
Re: Navigation structure
There are many ways:
- With the default template, you can control which articles appear on the homepage under Presentation › Section. Each section has the option “On default page?”. Switch this off for each section you wish to exclude from showing on the homepage.
- A more definitive way is to create a separate page template under Presentation › Pages that only shows your relevant content for the homepage. Back on the Sections panel, you then assign this page template to the default page. From then on, the start page behaves differently to the other sections.
I also saw the option of “sticky” in the backend, but I don’t think that will work for this. Is this correct?
Yes, you’re right. While you could do that, that’s not its typical purpose. Setting an article to sticky status is a way of taking an article out of the flow of regular articles in a section. A typical use-case is to make the sticky article appear first in a list – or on its own – on a section’s landing page. For example, in one of your sections, you might want to use the content from one article for the intro blurb and then link on to subsequent articles in that section. In the txp:article or txp:article_custom you can use the attribute status="live" or status="sticky" to control which type of article should display. If you just include status (without specifying which), the article tag will show both.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Navigation structure
PeterB wrote #342536:
To display the first article, I’ve updated the “Welcome to Textpattern” article. This article should always be visible when a visitor visits the website. An exception, of course, is if the visitor arrives, for example, via a targeted Google search for a specific article. New articles should never be displayed on the homepage by default; the currently visible article is the only one allowed to be displayed. Do I need to take any further action to make this happen, or is it unnecessary? In Joomla, for example, I would need to make this a “Special Article.” I also saw the option of “sticky” in the backend, but I don’t think that will work for this. Is this correct?
Hi Peter,
You can give the article a sticky status and in your default template add:
<txp:if_section name="">
<txp:if_search>
.... your search tags here
<txp:else />
<article>
<txp:article_custom id="1" status="sticky">
<h1><txp:title /></h1>
<txp:body />
</txp:article_custom>
</article>
</txp:if_search>
</txp:if_section>
> Edited to add that jakob was faster and that his method is also valid. Txp is very versatile and you can achieve same results using different methods.
Last edited by colak (2026-02-07 10:54:07)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#10 Today 03:02:49
Re: Navigation structure
Thanks for the clear explanation, and sorry for the late reply.
Offline
Pages: 1