Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#25 2004-08-08 23:27:19
- abilstein
- New Member
- Registered: 2004-06-12
- Posts: 5
Re: [plugin] [ORPHAN] chh_article_custom
Are there any issues with using this inside an article? It works fine for me when used in a template, but fails in an article.
I tested using a very limited parameter set. I used the exact same code in the same article using only the default article_custom and it worked fine, but chh_article_custom fails.
Any thoughts?
Offline
Re: [plugin] [ORPHAN] chh_article_custom
Mmm. Use of chh_article_custom within article text is, shall we say, not recommended. I imagine if you are not careful you could end up with some lovely infinite recursion.
I really don’t think it’s a good idea to use any txp tags within article text unless they are specifically designed for it — like the various excerpt-related plugins — not because doing so may produce undefined results (though that’s possible, too) but because this breaks the separation of code and content.
FWIW, using txp:article_custom with no attributes within an article crashed my apache process whether I used txp:article or txp:article_custom in the page template.
Offline
#27 2004-08-09 14:00:01
- abilstein
- New Member
- Registered: 2004-06-12
- Posts: 5
Re: [plugin] [ORPHAN] chh_article_custom
Interesting.
The reason I wanted to do this was to avoid making multiple templates (Pages) within one section. In this case, it’s a News section with one static page, one page displaying a list of articles from multiple categories, and several pages displaying a list of articles from one category.
Since the template is otherwise identical aside from the display of articles, I wanted to minimize the number of templates I had to maintain. I can’t seem to do this without moving some of the display logic into the articles themselves.
I should also menteion that I want to use clean URL’s so passing the category name through the URL is undesirable.
I guess I’ll have to make another template, but it would be nice if I didn’t have to do this.
Interesting that it crashed your process. Is there a resource of what should be used in templates and what should be used in articles? It’s not quite clear to me I guess.
Offline
Re: [plugin] [ORPHAN] chh_article_custom
I really think this plug-in will resolve many issue I have, however, I must make it work first. I’m using version .41…
This works: <code><txp:chh_article_custom form=“faq_article” listform=“faq_list” limit=“1000” /></code>
When I change it to this: <code><txp:chh_article_custom form=“faq_article” listform=“faq_list” limit=“1000” category=“General” /></code>
I get the following message: <code>Warning: array_push(): First argument should be an array in /home/www/server/beta/textpattern/publish.php(764) : eval()’d code on line 227</code>
Any suggestions?
Last edited by vaughn-taylor (2004-08-11 17:30:44)
Work until your carpal tunnel makes you cry.
—————————-
My “bloggy” TP site >> liberalrevolt.com
Offline
Re: [plugin] [ORPHAN] chh_article_custom
I may have resolved my problem … I guess I need to include the children attribute if I’m using the category attribute? It fixed the issue anyway.
Work until your carpal tunnel makes you cry.
—————————-
My “bloggy” TP site >> liberalrevolt.com
Offline
Re: [plugin] [ORPHAN] chh_article_custom
> vaughn-taylor wrote:
> I may have resolved my problem … I guess I need to include the children attribute if I’m using the category attribute? It fixed the issue anyway.
No, it’s a bug. I’ll have a look at it. I may have been victimized by PHP’s lack of DWIMery.
Offline
Re: [plugin] [ORPHAN] chh_article_custom
Found a “bug” in the chh_flipflop.
This is an example of the code from the page:
<txp:chh_article_custom form="project_list" category="Web" section="project" sortby="Title" sortdir="asc" listform="project_list" />
And this from the form:
<tr class="<txp:chh_flipflop odd="shift" even="normal" />">
However .. I have multiple <txp:chh_article_custom>
on the page which all use the same listform and it seems as the chh_flipflop does not reset the count since the next list I show start with the corresponding next odd/even that the latest list would have.
Last edited by obeewan (2004-08-13 05:35:02)
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
Re: [plugin] [ORPHAN] chh_article_custom
I took action and updated the code of the plugin to go for my needs by adding the count to a global var instead (named $chh_article_custom_count
since it had to be set there, not in the chh_flipflop
).
Last edited by obeewan (2004-09-06 13:20:51)
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
#33 2004-09-06 07:30:34
- drewdrew
- New Member
- Registered: 2004-09-02
- Posts: 2
Re: [plugin] [ORPHAN] chh_article_custom
If I’m not mistaken, this wonderful plug-in doesn’t seem to accept wraptag or break. Is this by design? Any chance it could be added? I’m trying to avoid hard-coding a UL, for example, around this tag to produce the desired results. Don’t want to lave an empty UL floating out there if/when its criteria isn’t met.
Offline
#34 2004-09-06 12:02:42
- Gabe
- New Member
- Registered: 2004-09-06
- Posts: 5
Re: [plugin] [ORPHAN] chh_article_custom
Maybe comeone can help me out – I’m getting blanks with this:<code>
txp:chh_article_custom form=“bio_form” category=“bio” </code> – which attributes have to be set explicitly?
Offline
Re: [plugin] [ORPHAN] chh_article_custom
Gabe,
Does the form exist, correctly spelled and do your category have articles assigned to it? (Sounds basic but easy to miss).
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
#36 2004-09-06 14:59:43
- Gabe
- New Member
- Registered: 2004-09-06
- Posts: 5
Re: [plugin] [ORPHAN] chh_article_custom
Yep, even <code><txp:chh_article_custom form=“Single”></code> doesn’t seem to work, while <code><txp:article_custom form=“Single” ></code> works fine. The plugin is ‘Active’. I’m a complete beginner on using plugins – is there a classic mistakes list you could point me to?
Offline