Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Article from a section in place of an article in another section
Thank you ibob. That’s a weird trick indeed because of the url scheme. It might work. But it doesn’t fit my urls.
Isn’t .htaccess the solution ?
Last edited by hablablow (2010-12-19 22:45:49)
_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__
Offline
Re: Article from a section in place of an article in another section
hablablow wrote:
I’m using section/category/title as url scheme and I don’t know if it’s possible to achieve this through the use of categories as a glue…
At this point I’ll need to see your requirements stated in a general way to better understand what you’re trying to achieve. Where (i.e., at what URLs) does this multi-section article need to appear? In article list context, where does it need to appear within any list?
Code is topiary
Offline
Re: Article from a section in place of an article in another section
Jeff,
So long fritz let’s move on with a more abstractable example. Let’s assume we have a general section holding all articles: sectionA
All articles belonging to this section are in a category: category1 to category5
Let’s name our articles article 1 to article 20.
Article list is accessible from:
sectionA/
sectionA/category1
sectionA/category2
sectionA/category3
etc…
Article body is accessible from:
sectionA/category1/article1
sectionA/category1/article2
sectionA/category2/article3
etc…
Now in case I have a section B I would like also to access the article list from:
sectionB/
This one is currently working ! I get the article listing from sectionA
And the article body from:
sectionB/category1/article1
or maybe if category can’t come to the rescue to glue an article in sectionB
sectionB/article1
This last example, url, is not working, it fires a 404.
Last edited by hablablow (2010-12-19 23:19:55)
_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__
Offline
Re: Article from a section in place of an article in another section
Where does section/category/title URL scheme come from? That isn’t a core Txp scheme.
Code is topiary
Offline
Re: Article from a section in place of an article in another section
No sorry Jeff forgot to mention I’m using gbp_permanent_links to do this, else it’s not natively supported by Txp.
_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__
Offline
Re: Article from a section in place of an article in another section
OK, thought so. I don’t know enough about gbp_permanent_links to know how that would affect this.
Code is topiary
Offline
#19 2010-12-20 00:48:50
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: Article from a section in place of an article in another section
The URL represents a logical structure. Fritz can’t be in the same life dog and cat. Maybe you need rethink the logic of your website.
Let’s assume we have a general section holding all articles.
That’s not necessary. You can output a list of all your articles with <txp:article_custom />
where you want, regardless which section they are assigned.
I suggest: Find a way to think that what seems too complicated in a less complicated manner, make it simple.
Offline
Re: Article from a section in place of an article in another section
hablablow
I’m confused by your logic here too. So far you haven’t explained why (i.e. what benefit it gives to your visitors) to have the same article permlink viewable from two distinct URLs. Even if you did manage it, search engines might penalize you for duplicating content (at best). Worst case they might think you’re spamming or link manipulating, and slap a content warning on the search results.
Bottom line is that there’s a reason the URL to an article is unique: SEO and site usability. Breaking this structure isn’t what Textpattern is about, hence the reason you are struggling to find an asnwer from the fine folk trying to help out.
If you’re doing an ‘archive’ page like iBob mentioned — siphoning off content based on date — then you can easily do that with any number of plugins and keep everything in the same section. Similarly, if you are trying to feature some articles to pull them to the top of a section, smd_featured can help.
If the visible URL in the address bar isn’t an issue then you are right that .htaccess might help so you can redirect anything from /dogs to /cats. Or you could look at writing a simple plugin that works similar to the way smd_short_url does: it monitors for 404s and then redirects to an article afterwards [if you go this route, you should take note of the recent comments by maniqui on the smd_shurt_url / gbp_permanent_links threads as they impact interoperability of the two plugins right now. Thus if you modify smd_short_url (or find someone who is willing to do it for you) then the information there will be useful to avoid some head scratching]
After that I really don’t know what else to suggest, sorry. I don’t think TXP can help out directly and perhaps the best avenue will be to rethink your approach, as GugUser suggests, by figuring out what it is you’re trying to achieve from a visitor / SEO viewpoint and work back from there.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Article from a section in place of an article in another section
Thank you all for your answers, as usually most appreciated…
Here’s a resume of the previous posts and what I’m trying to achieve.
SectionA holds all articles posted also in categories. Url is built with the use of the gbp_permanent_links plugin.
So we have:
site.com/sectionA/category/article
I want to duplicate all the articles, make them reachable at a second sectionB, at the url:
site.com/sectionB/article
Of course this second wish blows a 404.
The logic behind this duplicated content is to create some sort of meta sectionB that would hold all articles from sectionA and so provide a quick and easy access to whole site’s content, browsing always from the top of that second sectionB and so avoid the user to go down inside a category, as he does in the sectionA. In this sectionA, categories are used to filter, to display items only from the currently viewed category.
Think about it as a two dimensional navigation: on one side, sectionA, user accesses articles only through what’s listed in each categories, on the other side, in the other sectionB holding whole content, user accesses to all elements on the site, without going down inside a category and so being trapped into an article listing that can only display items in the currently viewed category.
I could easily achieve this on the top of the sectionA where all articles have been saved, but then when a user clicks on a link he will go down the tree and fall into a category in which, I say it again, only articles belonging to the current category are visible. The user will loose focus then on what’s visible sitewide, on all articles available on the site, thus the idea of another section that would not use categories and that will let the user view all articles, sitewide.
I’m using only one article list for each page which means I can’t mix what’s inside the current viewed category with another menu displaying all articles sitewide.
I admit it’s a very special scenario but it fits my case..
Of course this would impact seo as it would create duplicate entries for the same content but I planed to forbid search engines to crawl this second path. And it’s precisely the reason to be of this sectionB. If I do this from sectionA, allowing a user to browse at the same time to site.com/sectionA/category/article and to site.com/sectionA/article, search engines will heavily penalize this practice. If I’m using another sectionB and restrict search engines to crawl it, goal is achived.
I really hope someone will catch the scenario here as is it stands outside the typical Txp logic, but again it fits my case here, which at the end might not be an exception if you think about it.
Thanks for your time folks.
I’ll study the ressources you mention Stef and look through the different options…
Meanwhile if someone wants to add another idea…
Last edited by hablablow (2010-12-20 13:50:05)
_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__
Offline