Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2008-05-27 16:39:22

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

Hi Chriloi,
just when you started working on clean urls for your plugin, Graeme has begun to rework his gbp_permanent_links talking about the possibility to integrate his plugin with existing subsections plugins. Have a look here

Offline

#38 2008-05-27 16:46:07

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

My Windows Explorer doesn’t show any files, but only folders in the tree.

I don’t know what OS you use, but anyway I have not planned to implement any expanding or collapsing functions. Maybe I’ll add these when everything else is working. ;)

If you’re lucky, you might want to get the new version. I fixed and improved some things and as well added a class attribute to the article li-s. I think this version behaves more likely to what users expect. :)

Ahh, I forgot to say that it works quite well togehter with sed_section_fields!

edit: was able to make sed_section_fields work without touching it.

Last edited by chriloi (2008-05-27 20:26:26)

Offline

#39 2008-05-27 17:01:37

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

@redbot:

Quite interesting… I wrote an email to him back in december 07 with exactly that purpose and he did not answer.

Offline

#40 2008-05-27 17:02:34

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

Thanks a lot, Christian! I’ll try it out this night.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#41 2008-05-27 18:38:27

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

chriloi wrote:

Quite interesting… I wrote an email to him back in december 07 with exactly that purpose and he did not answer.

I did reply!! Just sent another copy of it.

Offline

#42 2008-05-27 22:53:43

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

Alright, I’ve taken some time to see how things are working:

Seems like css-properties have to be placed at the end of the tag in order to work? I can’t remember which one of these I had to insert above the css class assignments, active_section_articles or exclude_empties, but css attributes showed up only after removing one of these from the end. If this can’t have an effect, I always might have incidentally been looking at the wrong articles’ sourcecode. Maybe.

I can’t get css_active_article_class to output a class name.

The bewitched section (see post above) acts the same as with 0.3.4, whereas there are now two sections I seem to get some kind of “default article” for: I cannot choose a different article by clicking on cnk_st. Clicking a different nav tag reveals these articles well.

cnk tag used:

<txp:cnk_sec_list 
active_section_article_order_by="posted" 
active_section_article_order="asc" 
active_section_articles="y" 
exclude_empties="n" 
css_active_section_class="actsec" 
css_active_article_class="actart" 
css_article_class="artcla" />

Article tag used:

<txp:article limit="1" sort="posted asc" />
(No surrounding conditionals on page nor in default form)

There is a little mistake in the first post’s css value declarations: Both, css_active_article_class and css_article_class, have the same defaults.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#43 2008-05-27 23:27:27

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

Hmm, the order of tag parameters does not affect how they are processed. I tested some situations, but it always renders as expected.
css_active_article_class is appended to the standard css_article_class (e.g. class=“artcla, actart”) Please have a second look.

The bewitched section (see post above) acts the same as with 0.3.4, whereas there are now two sections I seem to get some kind of “default article” for: I cannot choose a different article by clicking on cnk_st. Clicking a different nav tag reveals these articles well.

Can you write an email to me and explain this behaviour in german. Perhaps a screenshot would help me to understand you…

Offline

#44 2008-05-29 04:10:37

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

New version 0.3.7 out!

This version introduces a new tag <txp:cnk_breadcrumb />.

I’ve also fixed the url-schemes.

Offline

#45 2008-05-29 22:06:50

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

v0.3.9 has some new css_* arguments and an argument called expand_all. If set to ‘n’, all sections are set to class=“cnk_section_close”, but only the active one and its parents are set to class=“cnk_section_open”.

Add the following css snippet to your page css and the tree will behave like a filesystem tree:

#cnk_sec_tree li
{
list-style-position: inside;
}

.cnk_article
{
list-style-image:url(txp_img/file.gif);
}

.cnk_section_open
{
list-style-image:url(txp_img/folder.gif);
}

.cnk_section_closed
{
list-style-image:url(txp_img/folder-closed.gif);
}

.cnk_section_closed ul
{
display:none;
}

Offline

#46 2008-06-01 13:00:59

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

Christian,

cnk_section_tree is a great plugin and just what I needed, thanks.

I have some questions:
1) Any reason it doesn’t output a link to the default section?
2) What’s the purpose of the <div id=“cnk_section_tree”> … </div>? I notice that they now have a unique id if there’s more than one invocation of cnk_section_tree (I’m using it for a dropdown menu and a sitemap) but they seem rather superfluous.
3) An additional CSS class to indicate whether a section has subsections would be handy (to serve my purposes, I updated your code to add a class of “menuparent” to a section <li> if it has children)
4) I think I might have found a bug in cnk_breadcrumb – what’s the best way of sending you some diagnostics?

Thanks,

Adi

Offline

#47 2008-06-01 15:51:54

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

@gomedia:

1) Any reason why it should?
2) If you don’t need it, get rid of it. (For the dropdown menu you have to manipulate the code anyway…)
3) Will put this into the next version
4) You can either post it here or send it by email

Offline

#48 2008-06-01 23:29:04

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

Thanks for the reply.

1) As the default section is the landing page, I assumed that a link to it would be useful. The standard TXP tag section_list has an option to output a link to the default section. I know a separate “home” page can be implemented but when a section list is used as a menu, the “active_menu” class only gets actioned when the home page link (www…/?s=home) is clicked – not when the user first lands on the website (www…/).

2) The reason I queried this was because any styling to the top level block element could be done on the top level ul not to an enclosing div. Also, if I was going to use an enclosing div I would do it separately in the page or form and probably use it to bundle up the tree with something else, e.g. <div><p>Section list:</p><txp:cnk_sec_list/></div>

3) Thanks. This would come in handy to indicate if a top level menu item has sub-levels (e.g. with an arrow).

4) Rather than clutter up this thread, I’ll post something on pastebin a little later.

Regards,

Adi

Offline

Board footer

Powered by FluxBB