Search
Other Articles Anywhere questions
Forum

Output only part of an URL

Thomas Venugopal's Avatar Thomas Venugopal
Hello, I have many landingpages:

/product1/order
/product2/order
/product3/order
etc.

On every order page should be a button linking to its parent item. For example: On page /product1/order should be a link with the target /product1

Is this possible? It would save a lot of work and make the links less error-prone.
Peter van Westen's Avatar Peter van Westen ADMIN
Not sure what this has to do with Articles Anywhere.
Is 'product1' the category in which the article 'order' is placed?
Please post a rating at the Joomla! Extensions Directory
Thomas Venugopal's Avatar Thomas Venugopal
Yes, every landingpage has its own category and every order and thank you page is in the same category.
Thomas Venugopal's Avatar Thomas Venugopal
Sorry, I might not formulated it well.

The structure is like this:

landingpage1 (category)
|- landingpage1 (linking to order page)
|- order (here I need to link back to the landingpage)
|- thank you

landingpage2 (category)
|- landingpage2
|- order (here I need to link back to the landingpage)
|- Thank you

landingpage3 (category)
|- landingpage3
|- order (here I need to link back to the landingpage)
|- thank you

Is it possible to output the referrer as a data tag on the order page linking to the landingpage in it's same category?
Peter van Westen's Avatar Peter van Westen ADMIN
No, there is no option to output the referrer via Articles Anywhere.

You could use Sourcerer to output the referrer via PHP. But what if someone gets to that order page via a different route (direct URL or link from somewhere else...)?

regularlabs.com/sourcerer
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
What you could maybe do is search for the landingpage article in the same category as the order article.
Then you can output the link to that.

What do all those landing pages have in common?
Do they have something in the title or alias that is the same? Or is it always the article with the lowest ID in the category? Or the first in the article ordering?
Please post a rating at the Joomla! Extensions Directory
Thomas Venugopal's Avatar Thomas Venugopal
What you could maybe do is search for the landingpage article in the same category as the order article.
Then you can output the link to that.

That's want I want to achieve.
What do all those landing pages have in common?

They all have the same menu structure:

Landingpage1
|-> Order
|--> Thank you

Resulting in this url structure: /landingpage1/order/thank-you

The slugs of the three articles have this pattern, maybe this could help?

Landingpage: <individual slug>
Order: order-<internal-id>
Thank you: thank-you-<internal id>
Peter van Westen's Avatar Peter van Westen ADMIN
I don't mean the url structure. I meant in the article structure/data.
Please post a rating at the Joomla! Extensions Directory
Thomas Venugopal's Avatar Thomas Venugopal
What about the second idea. The idea is to look if the slug of the articles in the category are NOT order-* and NOT thank-you-* which should result in the landingpage. Or am I wrong?
Peter van Westen's Avatar Peter van Westen ADMIN
I assume the main landingpage article will be the first in the category, according to the ordering. If not, you can do that to make this work:
{articles category="current" ordering="ordering ASC" limit="1"}
[link]back to the landingpage[/link]
{/articles}
See:
docs4.regularlabs.com/articlesanywhere/p...s-as-current-article
docs4.regularlabs.com/articlesanywhere/p...g-ordering-direction
docs4.regularlabs.com/articlesanywhere/p...settings#limit-range
Please post a rating at the Joomla! Extensions Directory
Thomas Venugopal's Avatar Thomas Venugopal
It works, thank you for the idea!
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription