Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-20 19:21:24

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Site structure with crossing information blocks

I am once again working on something, that should have been finished two months ago.
In short:
For the need of my own corporate website over-thinking the information structure brought me to the following point.
1) I need to output article content in three different locations:

A) On the front-page as an excerpt
B) As a fraction of the article body on the services section (article does not live here)
( I want to make this some sort of extensible, so that each info block corresponds to some sort of service that has a specific pricing scheme)
C)As full article ( or better as another fraction of that article ) on the info-pages section
(This is where those special articles live and most probably are also sorted by category in some way)

In other words, I have crossing information blocks. that belong to the same article each time and that are changing form in three different locations.
From what I know this is usually done with harringtons chh_article_custom plugin.
Combined with nicos etz_pagination plugin this could may be work ( If I can ommit the pagination links in some places)
Custom fields came to my mind, but I havent wrapped my mind around it yet.
All this of course needs to be tested, before the final implementation takes place.

Before doing so, I would like to ask for Ideas about any other approach to accomplish this.

EDIT.: I iam concentrating here on 4.0.3 version and also want to attempt to make it work with
the multi-language plugin that Steve organizes and is under development.

Thanks in advance, and best regards, marios

Last edited by marios (2006-07-20 19:39:50)


⌃ ⇧ < ⌃ ⇧ >

Offline

#2 2006-07-20 19:51:07

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: Site structure with crossing information blocks

I am a little confused as to what you mean in (B).. are you saying that your excerpt field is already in use and you need to output a different chunk of text?

Offline

#3 2006-07-20 20:19:35

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Site structure with crossing information blocks

Well, I’d use the excerpts of the articles on the front page as teaser blurbs, then each teaser blurb has two links with it, one that guides you to the section where the article is assigned to but will just show the fraction of the article body that is aimed to provide the client with viable information about problematic aspects of modern web design (That would be C)
Then the other link will put the site visitor on a services section where each problematic aspect is related to a service that is available for him as a potential client.(That would be B, but the article does not live here, it is just displayed in a different section with different content, although we are talking about the same article.)
So to understand that from the atomic content structure side, I am abusing articles and try to fake them to emulate a Title-bodyfraction1-bodyfraction2-excerpt structure, instead of a Title-body-excerpt structure, that TXP natively support.

The aim here is to have a parallel information structure between an info block and a service block, allthough these blocks belong to the same articles each time.
(That make it easy to extend and maintain)

BTW.: I think that custom fields have a certain limitation of charracters in their corresponding fields, but can’t recall the size of the limit, although that could be changed I think.

regards, marios

Last edited by marios (2006-07-20 20:30:20)


⌃ ⇧ < ⌃ ⇧ >

Offline

#4 2006-07-20 20:30:13

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: Site structure with crossing information blocks

Have you tried using this plugin ?

Offline

#5 2006-07-20 20:38:26

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Site structure with crossing information blocks

No, since this plugin is only triggered, when there is no excerpt available, which is not the case, since all my articles will have an excerpt, that gets displayed on the front-page, but apart from this excerpt each article body will be split in two parts, where one part is displayed on its own section and the other part in another section.(with the link to the other part with it on the section pages)

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#6 2006-07-20 21:08:07

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: Site structure with crossing information blocks

Hmm… This is quite a pickle you got yourself into here.

Personally, I would:

1. Split them up into 3 articles

2. Assign a Custom Field to this article group and put the relevant info in those custom fields ot distinguish each one.

3. Call them up by custom field:

<code><txp:article_custom CustFieldName=“Whatever you entered in Custom Field” /></code>

Offline

#7 2006-07-20 22:55:50

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Site structure with crossing information blocks

Thought about this as well, but then, when I split the blocks to different articles, I will loose track of what happens from the backend side, so this is rather a maintenance Issue rather than an Implementation Issue.
Speaking in sql terms, what other options do I have to tie those articles together inside those groups ?
Is that again something doable with a custom made plugin ?

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#8 2006-07-20 23:22:39

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: Site structure with crossing information blocks

The only thing I can think of off the top of my head is a plugin that would either:

A. Add another excerpt field to the write tab
B. Split up your article either by paragraph or at a specified point in your article (ie: h tags)

Personally I think option A is the best bet. I could probably hack the admin to get the desired effect, but plugin format would obviously be ideal.

I would be interested in the development of such a plugin as I have come across similar dilemnas when trying to group certain pieces of information together. In a perfect world you could have a “+” button next to the Excerpt field and add as many as you want…. but thats just me getting ahead of myself as usual.. :)

Offline

#9 2006-07-20 23:46:44

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Site structure with crossing information blocks

That sounds interesting, yes from my feeling about it I’d also focus on option A.
The basic problem that we are hitting here in terms of Information Architecture is that TXP has been designed as a Publishing Tool, so It thinks of a basic bit of Information as an article with three fields.
One of the first plugins that helped to bypass that hurdle was Nicos etz_pagination plugin (you leave as many markers in the article as you want, and can break down the article in different chunks, that’s why I mentioned it above)
I think I’ll set up a test Site to check Nicos plugin out for this.
I had implemented it in my experimental blog and it works quite well.(It is unviewable though, since the section is down)
I think, I will consider to place a request at Marys thread, but then again I’d probably discuss a couple of the multi-language things with Steve before I do so.

thanks and best regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#10 2006-07-23 13:00:54

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: Site structure with crossing information blocks

As promised, here is a handy guide for converting a custom field to a second excerpt field.

(1) Go to PHPmyAdmin
(2) Open up the textpattern table
(3) Change the desired custom field from varchar255 to text

That takes care of your MySQL table…now we have to make a quick modification of the actual admin interface.
For example, let’s say you want to use custom_7 as your “Info” field

(4) Go into your textpattern install folder, open txp_article.php inside the include folder
(5) Starting at Line 352, You will see a list of your custom fields. Delete the field you wish to convert to an excerpt. (So it doesnt show up twice)
(6) Around Line 469 you will come to the end of the excerpt code:

bc..
echo ($textile_excerpt USE_TEXTILE) ? ($view’preview’) ? graf($textile->textileThis($Excerpt)) : tag(str_replace(array(n,t), array(br,sp.sp.sp.sp),htmlspecialchars( $textile->TextileThis($Excerpt))),‘code’) : graf($Excerpt); } }

Right after this chunk of code (directly above the <code>//—author</code> comment), insert the following:

bc..
echo graf(gTxt(‘Info’).br. ‘<textarea style=“width:500px;height:50px” rows=“1” cols=“1” name=“custom_7” tabindex=“3”>’.$custom_7.’</textarea>’);

And there you have it. Save your changes and load up your admin once more to see the new field sitting pretty underneath your excerpt field.

Enjoy! :D

Offline

#11 2006-07-23 13:51:44

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Site structure with crossing information blocks

Hey, that looks terrific.
I can see, you are very much ahead of yourself again.
Thanks many, brother.

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#12 2006-07-23 14:24:49

fogfish
New Member
From: SF
Registered: 2004-06-08
Posts: 7
Website

Re: Site structure with crossing information blocks

Thanks for extra excerpt field.

Additionally, wouldn’t conditional category tags work too?

In excerpt…

txp:if_category name=“catA”> _txp:output_form form=“foo” /> _/txp:if_category>
txp:if_category name=“catB”> _txp:output_form form=“foo1” /> _/txp:if_category>

Where as form “foo” contains,
txp:if_custom_field name=“custom1”><txp:custom_field name=“custom1” /> _/txp:if_custom_field>
txp:if_custom_field name=“custom2”><txp:custom_field name=“custom1” /> _/txp:if_custom_field>

thanks, fogfish

Offline

Board footer

Powered by FluxBB