Posted August 29, 200717 yr When passing an array to do_output that is to be used as the navigation cookie trail, it would be nice if we could also pass URLs. This way we could have more control over our entire cookie trail when creating our own components.class_display.php line 126 simply says;if ($n) { $nav .= "<{F_NAV_SEP}>" . $n; } where as something more along the line of this seems more useful. if ($n) { if (is_array($n)) { $nAnchor = (!empty($n[0]))?$n[0]:""; $nUrl = (!empty($n[1]))?$n[1]:""; $nTarget = (!empty($n[2]))?$n[2]:""; $nav .= "<{F_NAV_SEP}><a href='".$nUrl."' target='".$nTarget."'>".$nAnchor."</a>"; } else { $nav .= "<{F_NAV_SEP}>" . $n; } }Thoughts?Thanks
August 29, 200717 yr When passing an array to do_output that is to be used as the navigation cookie trail, it would be nice if we could also pass URLs. This way we could have more control over our entire cookie trail when creating our own components.class_display.php line 126 simply says;if ($n) { $nav .= "<{F_NAV_SEP}>" . $n; } where as something more along the line of this seems more useful. if ($n) { if (is_array($n)) { $nAnchor = (!empty($n[0]))?$n[0]:""; $nUrl = (!empty($n[1]))?$n[1]:""; $nTarget = (!empty($n[2]))?$n[2]:""; $nav .= "<{F_NAV_SEP}><a href='".$nUrl."' target='".$nTarget."'>".$nAnchor."</a>"; } else { $nav .= "<{F_NAV_SEP}>" . $n; } }Thoughts?Thanksif I were you post that in hereDid you find a bug in IP.Board?If you believe you've found a bug please post it to the bug tracker.
August 29, 200717 yr Well, you're misinterpreting how do_output works. To build the breadcrumb trail, you do something like this:$title = 'Page Title'; $nav = array( '<a href="http://forums.invisionpower.com/">IPS Forums</a>' ); $out = 'This is some text'; $this->ipsclass->print->add_output( $out ); $this->ipsclass->print->do_output( array( 'TITLE' => $title, 'JS' => 0, 'NAV' => $nav ) );You can add as many breadcrumb elements as you want.
August 29, 200717 yr Yeah I realized you could do that.. but for some reason that seems "unclean" to me. I guess I don't like the idea of injecting html in that manner.. but then that may be the norm with the forum.. I'm still learning how things work.
September 2, 200717 yr Yeah, there are some internal functions that generate HTML too, which seems somewhat out of place given the template-based design. But I guess it'd be messy either way (as is or as templates), so there's not much that can be done.
Archived
This topic is now archived and is closed to further replies.