Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#61 2006-06-30 13:47:31
- sgoodwin
- Member
- From: Boston, MA
- Registered: 2006-05-11
- Posts: 13
Re: [plugin] [ORPHAN] cbs_category_list
perfect! thanks so much!
Offline
#62 2006-07-01 23:10:44
- dimfish
- Member
- Registered: 2006-06-01
- Posts: 72
Re: [plugin] [ORPHAN] cbs_category_list
Great. Works a treat. Thanks v.much
Offline
#63 2006-07-05 10:47:10
- urbanclearway
- New Member
- Registered: 2006-07-05
- Posts: 4
Re: [plugin] [ORPHAN] cbs_category_list
Hi Christophe,
I like your plugin, it’s just what I was looking, excellent piece of work.
I am having one problem however. I can’t get the css class attribute to output. My code is this:
<code><txp:cbs_category_list section=“Blended-Learning-at-Glamorgan” posted=“past” showcount=“false” break=“li” class=“subnav”/></code>
<p>but this only outputs list items like the following code:</p>
<code><li><a href=“http://localhost/Blended-Learning-at-Glamorgan/?c=Bids”>Bids</a></li></code>
<p>Even if I don’t try to define a class myself, the default class attribute doesn’t appear. What I’d like to see is this output:</p>
<code><li class=“subnav”><a href=“http://localhost/Blended-Learning-at-Glamorgan/?c=Bids”>Bids</a></li></code>
<p>I appreciate you are busy but if you could let me know what I’m doing wrong that would be greatly appreciated.</p>
Regards
Barry
Offline
Re: [plugin] [ORPHAN] cbs_category_list
Well, I’m on Holiday for the moment so I have a some time for the support!
First, you don’t use the “break” property correctly: if you specify “li” for “break”, you need to also specify “ul” or “ol” for the wraptag otherwise your XHTML list definition is invalid.
Second, it’s the wraptag that will get the class attribute, not the break tag. By default there is no wraptag so there is no class attribute either. The standard <code><txp:category_list /></code> works the same way.
So, assuming you want to display an unordered styled list of the “Blended-Learning-at-Glamorgan” section (don’t forget that if you don’t specify it, the plugin will display the current section), you need to call the plugin like that:
<code>
<txp:cbs_category_list section=“Blended-Learning-at-Glamorgan” wraptag=“ul” break=“li” class=“nav” />
</code>
This will output a list like: <code><ul class=“nav”><li>…</li><li>…</li></ul></code>
Then, style your list in your CSS like that:
<pre><code>
ul.nav {
…
}
ul.nav li {
…
}
</code></pre>
My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)
Offline
#65 2006-07-06 08:59:35
- urbanclearway
- New Member
- Registered: 2006-07-05
- Posts: 4
Re: [plugin] [ORPHAN] cbs_category_list
Hi Christophe,
Thank you for the swift reply. I understand now how your plugin is setup. Your right about XHTML invalidation – I’d covered that problem by manually wrapping your tag in an unordered list.
Your css though I think will solve my problem, I hadn’t thought of achieving what I want like that. Sometimes one’s train of thought gets carried away thinking something is ‘broken’ when really it’s your own use of it that is ‘broken’. It just needs someone to then come along with a different perspective and point back in the right direction.
Many thanks for the help, enjoy the rest of your holiday!!
Barry
Offline
Re: [plugin] [ORPHAN] cbs_category_list
Thanks.
I’m planning to release a new plugin in two or three days. I think people will like it.
My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)
Offline
Re: [plugin] [ORPHAN] cbs_category_list
Hi
I just stumbled on one bug. The plugin generates links with clear urls when using it in an article list. when using the plugin in a individual article it uses messy urls with /?c=category
can this be fixed?
Offline
Re: [plugin] [ORPHAN] cbs_category_list
I get the section-specific, messy URL’s for both articles and article lists.
Offline
Re: [plugin] [ORPHAN] cbs_category_list
This plugin uses a Textpattern function to generate the URL’s. So if there’s a bug, it is in this function and when it will be fixed, the plugin will be fixed also. I also get messy URL’s for both.
My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)
Offline
Re: [plugin] [ORPHAN] cbs_category_list
Thanks for this nice plugin. I have one request, and one problem:
- request : when using an unordered list, is it possible to get “active” class on the LI (list item) instead of on the link ? That way, I can both style the LI and the link
- problem : when I click on a link in my category list (made by this plugin), I get ALL articles, instead of just the articles of the clicked category. It’s probably not the fault of the plugin. For example, this link: http://www.samplify.be/test/tp/index.php?c=javascript&s=articles doesn’t give me the articles in the category “javascript”, but gives me all articles. It uses the page template “articles”, in which I have this form:
<code>
<txp:if_article_list>
<txp:article_custom form=“articleList” limit=“6” section=“articles” sortby=“Posted” sortdir=“desc” />
</txp:else />
<txp:article form=“SingleArticle” />
</txp:if_article_list>
</code>
How can I get this form show the articles of the selected category ?
Last edited by sambody (2006-08-12 20:50:36)
Offline
Re: [plugin] [ORPHAN] cbs_category_list
Nevermind, I found the answer to my problem myself. A simple <code><txp:article /></code> lists all articles from the current category (I don’t need to tell it : use “the current category”, which I was trying to do, it does it automatically).
My articles page template ends up like this:
<code>
<txp:if_article_list>
<txp:if_category>
<h2>Articles in category <txp:category title=1 /></h2>
<txp:article form=“articleList” />
<txp:else />
<h2>All articles</h2>
<txp:article_custom form=“articleList” limit=“5” section=“articles” sortby=“Posted” sortdir=“desc” />
</txp:if_category>
</txp:else />
<txp:article form=“SingleArticle” />
</txp:if_article_list>
</code>
Sorry for going a bit off topic.
Offline
Re: [plugin] [ORPHAN] cbs_category_list
Hi,
I have followed the instructions of http://mighthitgold.net/swap/txt_url_modifications_2005-03-07.txt,
also I have installed and activated plugin zem_rewrite, to which I have added the following line: <code>$uri_scheme[‘article’] = ‘{section}/{category}/{article}/{title}’;</code> and have obtained urls clean for all the Web site except when I use plugin.
The search engine can think that I have duplicated pages. Some solution?
Great plugin. Thanks!
Offline