Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2009-08-10 23:32:16

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Improvements to Content Control

Content types have come up before. I think I would be a great addition to TXP and not that hard to implement (DB wise). It would be a breaking change though so it would have to happen at some point where breaking backwards compatibility would be ok.

That being said section based url schemes like you can do with gbp_permanent_links would get you pretty far some ui changes to make “pages” automatically go to that section and maybe use override form as template chooser and you get pretty close.

Then of course you have to hide pages from the article list and hide teh pages section in teh article write tab and you start going down wanting to have content-types again :)

Last edited by hakjoon (2009-08-10 23:32:32)


Shoving is the answer – pusher robot

Offline

#32 2009-08-11 00:00:09

PascalL
Member
From: Switzerland
Registered: 2009-03-09
Posts: 132
Website

Re: Improvements to Content Control

I’m not sure I understand all the solutions posted here, and maybe I miss some points, so please tell me if I’m totally off.

As said before, Wordpress static pages are not much different from standard article. The real difference is the hierarchical navigation menu to access them. I think we can (nearly) do the same in Textpattern.

Please note that Wordpress pages are never mixed with articles, except with some plugins. We just need one section, let’s call it “pages”, and every static article will land there. We can easily exclude this section from all the other article listings. Default form should be fine.

Now we need to know “who” is the parent of the pages down the tree. For this we use a custom field named “parent”. Leave the field empty for root pages, and enter the URL-title for the others. I didn’t manage to make it work with the standard title, maybe because of spaces in nested tags. The URL-title should still be easy enough: “my-trip-around-the-world” instead of “My trip around the world”. Use of article ID is possible, but not very user friendly IMHO!

I didn’t bother ordering the pages for the moment, but we could do it with a custom field as well and give a rank, just like Wordpress does.

Now, in the sidebar we call the “static” menu:

<h4>Pages</h4>
<txp:article_custom section="static" parent="" form="static_article_list" break="li" wraptag="ul" />

and here is the static_article_list form which is a bit recursive-like:

<txp:permlink><txp:title /></txp:permlink>

  <txp:variable name="parent_name" value='<txp:article_url_title />' />
  <txp:article_custom section="static" parent='<txp:variable name="parent_name" />' break="li" wraptag="ul">
    <txp:permlink><txp:title /></txp:permlink>

    <txp:variable name="parent_name" value='<txp:article_url_title />' />
    <txp:article_custom section="static" parent='<txp:variable name="parent_name" />' break="li" wraptag="ul">
        <txp:permlink><txp:title /></txp:permlink>

        <!--insert more levels here-->

     </txp:article_custom>

  </txp:article_custom>

This form outputs three nested levels, this should be enough for most cases, but you can easily insert more levels.

As I suspected, true recursion, like call a form from inside himself, is not possible. But I think the code is quite straighforfard, thanks to the powerful txp:variable tag, and the uber-powerful tag nesting capability!!!

Now, this is just a start, I didn’t really look at the question of URLs, or the cost in term of queries needed just for static pages. And I’m sure I’ve overlooked other potential problems.

Offline

#33 2009-08-11 01:06:27

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Improvements to Content Control

Yeah but using variables/custom fields for this is totally a hack! Custom Fields should be used for additional article data, not for constructing stuff like this. The proposed system needs be very lightweight and easy to use for a potential idiot client who knows nothing of TXP semantics and not rely on complex templates in the backstage areas.

Content Types do sound like an awesome idea, but they need to addressed properly, if they become overly complex then it will break the minimalist approach that we are all used to with Textpattern. Perhaps Sections and Categories also need to be re-thought as they will play a major role in any changes to the core when dealing with such large changes! (Perhaps even sub-sections should be though about being finally added while we’re at it) I mean what do sections really offer? why would categories not be sufficient like in WordPress? Perhaps these need to be thought about so that it becomes really clear as to what they offer and how they can allow perfect control over various content types whilst still keeping the traditional TXP model in place.

Last edited by driz (2009-08-11 01:11:46)


~ Cameron

Offline

#34 2009-08-11 01:22:27

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: Improvements to Content Control

Cameron….nnnnoooooooooo!!!!!!

Bloody hell mate…don’t mention sub-sections.
This thread was going along so well…now it will get all polluted.

Just kidding. I’d love to see sub-sections – but stick to one battle at a time.

While I’m here: I must say that I’m impressed with many of the ideas here – and the improved attitude in your posts.

:)

Last edited by renobird (2009-08-11 01:23:34)

Offline

#35 2009-08-11 01:49:50

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Improvements to Content Control

I know I keep comparing things to WordPress but it has a good way of dealing with content from an idiot perspective and it also works quite well too however it relies on theme-dependancy where as TXP doesn’t have themes (this is why themes are a bad idea!)

But here is the problem in detail:

In WP you have a page, this page can contain text etc and then you either use the basic template or a custom one.
In TXP we create a section and then we can have any page template we like.

The problem here is that we haven’t created any content using the TXP method, we need to create an article as well, now this is a good thing because sections are not content but content dividers, but its also harder to grasp from a user view as in WP its just post your pages and organize, in TXP you have to create the section followed by the content but then the content needs tweaking (making stickie at the moment) for it to work. So this is clearly inefficient and also complicated in comparison to the WordPress method.

So the proposal, sections need redesigning so that they are a simple table in rows where the user can create nested schemes and so to create a site structure. Next we need content types to determine what kind of content we have available. We should probably have defaults here “Posts” “Pages” and then the user just has a simple write box and they can choose the section and the content type.

Example:

section is about and article is called about me and then content type is posts the url will be
domain.com/about/about-me

if the latter is the same but using pages as the content type then the url will be
domain.com/about/

This takes ideas from both WordPress and Drupal but keeps the Textpattern semantic model intact but much more powerful and easy to use.


~ Cameron

Offline

#36 2009-08-11 01:58:15

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Improvements to Content Control

One thought about rethinking sections and categories.

I do think sections offer something different from categories in that they are presentational groupings not organizato groupings (at least in TXP’s original design descriptions). However this gets mixed up because sections define the url location of the content, so they in essence become organizational.

One thing that could be done is to move all organization to categories and assign categories to sections for their presentation. So sections get removed from the url, but when items in category X are retrieved we know it belongs in section Y and we apply the appropriate page. This actually removes the presentation aspect even more from the client who should really be thinking of where things belong.

EZ-publish does this and it works. Again though this breaks current behavior so it needs to be thought about with care. But we already have parent/child category relationships so it would give us something akin to sub-sections.


Shoving is the answer – pusher robot

Offline

#37 2009-08-11 02:01:24

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: Improvements to Content Control

I mean what do sections really offer? why would categories not be sufficient like in WordPress?

Categories provide semantic links between content, sections offer site structure. Categories create relationships based on meaning across sections, which form the big buckets of site content.

Offline

#38 2009-08-11 11:22:35

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Improvements to Content Control

Quoting hakjon “One thing that could be done is to move all organization to categories and assign categories to sections for their presentation. So sections get removed from the url, but when items in category X are retrieved we know it belongs in section Y and we apply the appropriate page. This actually removes the presentation aspect even more from the client who should really be thinking of where things belong.”

I think this sounds quite good. But I still think sections need to be more like categories so we get double the amount of control.


~ Cameron

Offline

#39 2009-08-11 15:28:35

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: Improvements to Content Control

Quoting hakjon…

I saw Patrick’s post. But I think the suggestion ignores a very important difference between categories and sections: categories are based on meaning, sections are based on presentation. In Textpattern you can choose to arrange your content by either one or both (graphicpush) is a good example of a site with only one section to speak of, which uses the /title url scheme).

This suggestion would fundamentally alter Textpattern, and in my oppinion degrade it, by removing that choice. Sections are presentational— they define the url, page template, and styles used. Categories are not presentational— they create links between content based on shared meaning rather than shared presentation.

Again, in Textpattern, it’s up to the intelligent designer to choose a sensible way to organize the content, informed by one’s knowledge of the client and the site’s communication needs. The existing system gives you two very different options that can work together to create very robust sites. But if that’s too confusing, you can just use one, or none.

Offline

#40 2009-08-11 16:55:00

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Improvements to Content Control

I agree that sections are presentational but I think them being in the url is a side effect. For example in a site using /title scheme you can in fact have many different sections but they are not in the url. I think sections as url artifacts is a limiting factor imo.

Sections serve to attach a certain site area to a certain presentation scheme. Those areas can be defined a number of ways. Removing sections as an organizational system doesn’t really change anything capability wise it simply changes the semantics.

The main issue for me is that in order to create certain URL structures you are forced to organize things in certain ways, and some structures are impossible out of the box using just the content writing interface, and not forcing the client to dig into the implementation aspects

Creating a site like this

/about
/welcome
/programs
/programs/overview
/calendar
/calendar/by-event

without forcing the client to create sections, assign pages and styles (even if they all use the same page and styles), can’t be done out of the box because the only way to create a nested url structure is through sections, but they all use the same presentation, so the sections are not serving their purpose which is to define presentation.

Let me make clear that I don’t see this as some huge limitation. The system is flexible enough to accommodate most demands. The flow in soem cases is just sub optimal. Static page sites for example are an area where TXP is not super great at if you can’t just have /title url schemes.

Maybe I care about the url way too much.

Last edited by hakjoon (2009-08-11 16:58:41)


Shoving is the answer – pusher robot

Offline

#41 2009-08-20 16:01:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: Improvements to Content Control

Just wondered if this old thread on the TXP front page was relevant here? Or does it chuck a heavy mechanic’s wrench in the workings?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#42 2014-10-23 09:59:14

admi
Member
From: BY
Registered: 2007-12-10
Posts: 145
Website

Re: Improvements to Content Control

Hello TXP guys!

I thought long over the issue Parent – Child Page in TXP to be similar to WP. It is useful oftent when one does not want to mess with creating sections for the sake of 3 or for child artilces. May be, somebody already came with this or better idea but let me share the method with those who may be interesed.

I used the category with the same name as so called “Parent Article” url. Thus I have something like that –

<ul class="Parent-Articles">
<txp:article_custom section="your-section"  limit="10"  sort="posted desc">
<li><txp:permlink><txp:title /></txp:permlink></li>
    <ul class="Child-Articles">
    <txp:article_custom  category='<txp:article_url_title />' limit="10"  sort="posted desc">
    <li><txp:permlink><txp:title /></txp:permlink></li>
    </txp:article_custom>
    </ul>
</txp:article_custom>
</ul>

Also one can add in the form “default” under the tag “body”, then if there are any child articles they will be listed under the parent in whatever style you set.

<ul class="Child-Articles">
<txp:article_custom  category='<txp:article_url_title />' limit="10"  sort="posted desc">
<li><txp:permlink><txp:title /></txp:permlink></li>
</txp:article_custom>
</ul>

Offline

Board footer

Powered by FluxBB