Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Breadcrumbs on 4.8 beta
etc wrote #320903:
Yes, you should be able to solve it with a page like this (latest dev):
<txp:variable name="c1" value='<txp:page_url type="2" />' />
<txp:variable name="c2" value='<txp:page_url type="3" />' />
and …
<txp:article match="Category1=2, Category2=3" …
Woah! That’s cool.
So the first example is get the url parts split by a /? And the second one means, match url-part-2 to Category1 and url-part-3 to Category2?
TXP Builders – finely-crafted code, design and txp
Offline
Re: Breadcrumbs on 4.8 beta
etc wrote #320903:
Yes, you should be able to solve it with a page like this (latest dev):
<txp:article match="Category1=2, Category2=3" form="article_listing" />
Interesting! but I’m not sure that I understand this part: match="Category1=2, Category2=3"
> Edit Julian was faster:)
Last edited by colak (2020-01-07 17:15:01)
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: Breadcrumbs on 4.8 beta
I’ve split the topic in order to keep this thread focused, for future reference.
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: Breadcrumbs on 4.8 beta
colak wrote #320909:
Interesting! but I’m not sure that I understand this part:
match="Category1=2, Category2=3"> Edit Julian was faster:)
Yes, what Julian says. Moreover, Category1/2 can be filtered by URL variables: match="Category1=var1, Category2=var2" like other cf.
And if you need to select the articles with, say, not empty Category2, the syntax is
<txp:article_custom category match="Category2" ... />
And to exclude them
<txp:article_custom category match="Category2" exclude="category" ... />
Offline
Re: Breadcrumbs on 4.8 beta
I feel like a total idiot as I still do not get it:(
Could someone post a couple of url examples and how they are represented by the tags?
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: Breadcrumbs on 4.8 beta
colak wrote #320921:
Could someone post a couple of url examples and how they are represented by the tags?
It’s quite simple: to retrieve chemistry on this page
/departments/chemistry/staff/arrhenius
use
<txp:page_url type="2" />
since chemistry is the second (ltr) chunk of URL.
Offline
Re: Breadcrumbs on 4.8 beta
And match="Category1=2" syntax on /departments/chemistry/staff/arrhenius means articles with Category1='chemistry'. Alternatively, if your links were of the form
/departments/?name=chemistry&role=staff&person=arrhenius
you could retrieve chemistry with
<txp:page_url type="name" />
and match Category1 against it with match="Category1=name".
Offline
Re: Breadcrumbs on 4.8 beta
In your example is arrhenius corresponding to <txp:page_url type="4" /> or are these types only for sections and categories since we have article_url_title to detect the article titles? Also, Arrhenius should retire and offer his position to younger staff:)
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: Breadcrumbs on 4.8 beta
colak wrote #320926:
In your example is
arrheniuscorresponding to<txp:page_url type="4" />… ?
Yes, numeric types are agnostic of their txp role.
Also, Arrhenius should retire and offer his position to younger staff:)
The government has decided he must work a little more (local retirement reform actuality).
Offline