Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-08-12 17:37:24

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

/section/category/title Permanent link mode

Based on zem’s explanation of their understandable lack of time to search all available plugins for what best to add to the core code, and having searched for a similar request for this feature in Feature Requests and without finding any relevant threads (please let me know if I missed something), I respectfully request a feature that would be at the very top of my list:

If the development team are not yet aware of the sgb_url_handler plugin, I would be very happy if this plugin could be incorporated into the core code as it would provide options for managing corporate sites that are hierarchical rather than using blog style category-based navigation.

Unfortunately, sungodbiff, the plugin developer appears to be preoccupied at the moment (last seen) and has not yet updated the plugin for RC5. So, many who have been depending on this plugin, including myself, cannot upgrade to RC5 without breaking their sites. As a result, I myself have abandoned further development of my main site (I cannot upgrade beyond Textpattern RC3 revision 249 without breaking the site) to develop other sites using a basic template that works with RC5 using no plugins.

However, I have a client site that would work best with the ability to use /section/category/title as the Permanent link mode. While I don’t expect this might be a feature of version 1.0 (though that would be wonderful!), I would hope that it will be considered for future releases.

Last edited by bauhouse (2005-08-12 21:59:59)

Offline

#2 2005-08-13 05:40:45

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: /section/category/title Permanent link mode

Which category should it choose?

Added, for clarity: What I mean is, say an article has two categories assigned. When you tell Textpattern to hand out the permanent link to the post, which category should it choose?

Last edited by Mary (2005-08-13 05:47:02)

Offline

#3 2005-08-13 06:28:32

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: /section/category/title Permanent link mode

We’ll be looking at improving URL parsing, but not yet.

WRT sgb_url_handler: we will discuss it when we’re ready to look at URLs again, but I’m dubious that supporting multiple simultaneous URL schemes is supportable on a large scale. There are lots of things to go wrong, inside the code and outside. 400 lines of fairly dense code is not trivial (publish.php itself is about 950).

I think you’re more likely to see the built-in url handler stay with the same design (some improvements, and perhaps new schemes); and continued support for external URL handlers via plugins.


Alex

Offline

#4 2005-08-13 16:10:09

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: /section/category/title Permanent link mode

Thanks for the reply, zem. I see your point about adding that much code to the core. It does make more sense to maintain that as an optional plugin for those who don’t mind the extra density for the increased functionality. Probably for many it wouldn’t be that useful.

If I were to be selfish, I would only ask for support for the one extra mode that I find essential: section/category/title. But that would be selfish.

mary, regarding which category it would choose, I suppose that would depend on the tags used. Consider this example (if you don’t mind a long drawn out explanation of how I am getting around some limitations of the core code and why support for the section/category/title permanent link mode is essential for my site to work):

For a section called “portfolio” using a page template called “portfolio”, I control the use of which categories are available for selection with the following code to list only the categories that exist in a specific branch of the category hierarchy to a depth of 1 level:

bc..<txp:stw_category_tree section=“portfolio” start=“Design” prune=“true” maxlevel=“1” />

The categories are organized like this:

Design
- Identity
- Print
- Type
- Web
-- Textpattern

If you look at the live site, you’ll notice how the “Textpattern” category is not included in the list because maxlevel="1". By specifying the attribute section="portfolio", clicking on one of the links takes you automatically to /portfolio/?c=category. But here’s where I hacked the plugin to output /portfolio/category (which will only work with the sgb_url_handler plugin).

The output then looks like this:

bc..<ul> <li><a href=”/portfolio/Identity”>Identity</a></li> <li><a href=”/portfolio/Print”>Print</a></li> <li><a href=”/portfolio/Type”>Type</a></li> <li><a href=”/portfolio/Web”>Web</a></li>
</ul>

Then using a conditional plugin to limit this to displaying only on the section front page (/portfolio/), with the following code, I list the 9 most recent links to articles in my portfolio section.

bc..<txp:glx_if_section_frontpage>
<ul>
<txp:article_custom section=“portfolio” form=“list_titles” limit=“9” />
</ul>
</txp:glx_if_section_frontpage>

where the “list_titles” form looks like this:

bc..<li><txp:permlink><txp:title /></txp:permlink></li>

Once a category is selected, I can control the display of the “portfolio” page using a conditional tag and a plugin that displays only those articles that match the selected category and section:

bc..<txp:mdm_if_category>
<txp:rss_suparchive_bycat showcats=“0” section=“portfolio” />
</txp:mdm_if_category>

This outputs a list of articles in the following form:

bc..<div id=“rssCatArchive”>
<div id=“rssCatList”>
<ul>
<li class=“rssCart”><a href=“http://www.bauhouse.ca/portfolio/Identity/title1” title=“Permanent link to Title1”>Title1</a></li>
<li class=“rssCart”><a href=“http://www.bauhouse.ca/portfolio/Identity/title2” title=“Permanent link to Title2”>Title2</a></li>
<li class=“rssCart”><a href=“http://www.bauhouse.ca/portfolio/Identity/title3” title=“Permanent link to Title3”>Title3</a></li>
</ul>
</div>
</div>

Once an individual article has been selected from the list, I can display the same list of titles with another conditional tag and a plugin to specify listing the titles of only those articles that match category2 (that is /section/?c=category2):

bc..<txp:if_individual_article>
<ul>
<txp:rss_suparchive_bycat showcats=“0” useartcat2=“1” section=“portfolio” form=“list_titles” />
</ul>
</txp:if_individual_article>

In the same way, I can create a list of thumbnails for a gallery:

bc..<txp:rss_suparchive_bycat showcats=“0” useartcat2=“1” section=“portfolio” form=“article_thb” />

where the “article_thb” form looks like this (I needed to create an article thumbnail plugin to make this work, because, for whatever reason, zem_article_thumb worked great until I had two instances of the rss_suparchive_bycat on the same page, one for text links, one for thumbnails):

bc..<txp:permlink><txp:bau_article_thumb /></txp:permlink>

In effect, I have created three levels of navigation with a single page template. And that, Virginia, is why I need section/category/title to be supported by Textpattern. I have a working hierarchy, but only if I keep my install of Textpattern at revision 249 because of current plugin support. (Unfortunately category titles are not working at this point.)

Offline

#5 2005-08-13 16:18:31

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: /section/category/title Permanent link mode

A note: theres more to the section/category/article scheme than just a URI scheme. It’s a arbo (or taxonomy) issue. Right now we can’t filter the /author or /category results by section ; and on several website type that’s a problem.

Offline

#6 2005-08-13 16:59:16

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: /section/category/title Permanent link mode

Putting aside personal preferences for taxonomy, if there was a way to provide different options for classifications and associations that include hierarchy, I think that would be the ideal, rather than forcing a single method.

Textpattern already supports hierarchy, as I have spent literally days on figuring out (when someone who knew what they were doing might have spent a few hours). I would hate all that effort to be wasted because of lack of plugin support.

Textpattern, in its current state, could easily support (not that I really know how easy of difficult that might be to support) four levels of hierarchy if there was an option for a section/category1/category2/article permanent link mode.

Offline

#7 2005-11-25 07:46:57

Anton
Plugin Author
From: Alingsås, Sweden
Registered: 2004-11-16
Posts: 138
Website

Re: /section/category/title Permanent link mode

yes, me too. i’d very much like to see the proposals from bauhouse taken under serious consideration. after using textpattern on several live client sites, i see the need for this /section/category/title thing almost every day.

Offline

#8 2005-11-25 08:05:33

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: /section/category/title Permanent link mode

Another hearty vote for section/category/title or section/category1/category2/title urls. It seems the most logical way to structure many sites, and native support for it would be immensely useful.


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#9 2005-11-25 15:26:50

steventer
Member
Registered: 2004-12-03
Posts: 56

Re: /section/category/title Permanent link mode

Please add my vote for section/category/title or section/category1/category2/title urls.

Offline

#10 2005-11-29 15:38:40

qrayg
Member
From: USA
Registered: 2004-08-27
Posts: 81
Website

Re: /section/category/title Permanent link mode

Here’s my vote for s/c/t. I’m tired of having to mod some of the files on every upgrade just to get my site to work.

@Mary
The sgb_url_handler mod take care of the multiple category senarios. It uses the first one then the second (if available) it’s very smart about it. I can see that there might be issues adding this to the core but could it work as an Element?

Offline

#11 2005-11-29 18:04:27

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: /section/category/title Permanent link mode

…could it work as an Element?

Nope. Url handling is an integral part of the core itself. Elements are meant for optional admin-side “components” (for lack of a better word).

Offline

#12 2005-11-29 21:19:28

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: /section/category/title Permanent link mode

Just FYI: there’s already some tentative work in the 4.1 branch towards nested sections, which will probably make /section/category URLs both superfluous and unnecessarily complex.


Alex

Offline

Board footer

Powered by FluxBB