Features / Usability

Features / Usability

TOC plus structId and pagename params not working (v4.2)?

posts: 14

I'm part of a Family History One Name study group currently experimenting with Tiki v4.2. Its working well for us in many aspects. We're using structures extensively, to link individuals to their parents and children. Some of these structures have the potential to grow to be 15+ generations deep and 1000's of individual wide.

Having built the structure for a family, we wanted to avoid entering the children of an individual manually in the narrative on that individual's wiki page and found {toc maxdepth=1 shownum="1"} works fine, neatly listing their offspring.

We subsequently built additional structures to link these same individuals to source documents (wills, census returns, etc) and also locations. The {toc} is correctly sensitive to the current structure, so we needed to tell it which structure to use to keep the list of offspring constant.

http://doc.tikiwiki.org/Structure+User shows the parameter structId to the {toc} plugin. Great. So {toc maxdepth=1 shownum="1" structId=1} should give us a list of offspring regardless of which structure.

Except it doesn't seem to.

Using the structId paramater seems to list the structure from the top node and not the current page. The default value (the current page name) for the parameter pagename is being ignored.

OK, manually adding the pagename as {toc maxdepth=1 shownum="1" structId=1, pagename="Target_Individual"} should fix it. Except the pagename seem to be completely ignored. The result is the same as without the pagename parameter.

Is this user error, a design limitation or a bug? If a bug, does anybody know if is there a patch or work-around to fix it, please? I couldn't find one, but might be looking in the wrong places. If this is a bug, then I guess I need to report it to the Development community. This is really impacting our experience with Tiki, any suggestions welcomed.



posts: 1811 Catalan Countries

Martin, welcome to Tiki Community!

structId is the Id of the structure. Once you create a structure, the homepage (at least) has a pageId (number) associated with it. That's the structId.
Please, improve the docs if they are not clear on this aspect. Thanks!

On another hand, there is the dynamic variable { {page} } (without spaces between he angle brackets), which would be dynamically converted in the page name (not pageId, as far as I know) if dynamic variables feature is on. If needed, you could request a coder to add the pageId number as another dynamic variable?

Hope this helps

posts: 14

Xavi, thanks for your response.

The Id of the structure isn't causing me an issue and the docs seem fine to me.

My issue is that these two parameters to {toc} seem to be mutually exclusive. For our proposed usage that's a bug.

Not sure why using a variable for the pagename parameter should solve the issue, but I'll try it out and report back. It would make coding each page easier, but that's not the road block.

posts: 1811 Catalan Countries

ok, you are right, I didn't know of that addition of "pagename" param (it's new to me), and I didn't know that structId could work this way (nice if it did). Maybe bug report at http://dev.tikiwiki.org is needed?

Moeover, it might be that this param "pagename" was added in/for Tiki 5?

posts: 14

I've now managed to construct a simpler example which proves this isn't working in 4.2

I hope "pagename" wasn't added in v5. If it was then the documentation is in error (not showing tw=>5.x)
I'll go ahead and open a bug.

BTW I couldn't get your to work. Could you point me at the usage documentation for it, please. I can see it would be really useful.

posts: 1811 Catalan Countries

mmmm seems to be working in Tiki5 (at least) in a similar way as or in PluginTracker

However, it doesn't seem to be documented yet... sorry, ask on Irc if you wish in the meanwhile, and help document it as soon as you can.