Posts: 9
Threads: 4
Joined: Aug 2009
2010-03-25, 18:06:29
(This post was last modified: 2010-04-25, 20:07:52 by umefarooq.)
hi i love GS, nice and simple CMS, i was converting my template for GS where template has breadcrumbs , i have created a breadcrumb plugin for templates, everybody can use it in their templates feel free to modify and update code but you have nice code update in plugin please post here.
Thanks to @Oleg06 for updating plugin now it will get page title from each page data xml file now plugin will work for other languages with proper breadcrumb titles. url is updated with new plugin
new changes
added plugin admin to add you native language string for Home title and also to set you desired separator for the breadcrumbs from admin panel.
Download from this link
http://www.box.net/shared/69gvefdz6g
just call function where you want to create breadcrumbs
<ul>
<? get_breadcrumbs(); ?>
</ul>
Posts: 7
Threads: 1
Joined: Mar 2010
Posts: 1,928
Threads: 88
Joined: Apr 2010
2010-04-06, 00:57:16
(This post was last modified: 2010-04-06, 00:59:55 by jhondavis.)
how to make the display instead of the $ url but page name?
Code:
line 40 $crumbs .= "<li><a href='$pageURL'>".ucfirst(str_replace('-',' ',$url))."</a></li>";
Posts: 9
Threads: 4
Joined: Aug 2009
reason I'm using URL because most of pages slugs are as it is as tilte or page name and also if any page has parent it will get parent from URL also or wise we can read page xml file and can get page name and parent as menu function of CMS is working if you have any better solution share here i will look on it also.
Posts: 1,928
Threads: 88
Joined: Apr 2010
I do not understand PHP
Posts: 1,928
Threads: 88
Joined: Apr 2010
I need to reference written in Russian
Posts: 9
Threads: 4
Joined: Aug 2009
if you want Russian go to this link
http://www.google.com/language_tools?hl=ru
copy my post content and paste in text area and translate from English to Russian
Russian :
ÑÂúþÿøрþòðть üþù ÿþÑÂт ÑÂþôõрöðýøѠø òÑÂтðòьтõ õóþ ò þñûðÑÂть тõúÑÂтð ø ÿõрõòþô ѠðýóûøùÑÂúþóþ ýð руÑÂÑÂúøù
Posts: 1,928
Threads: 88
Joined: Apr 2010
2010-04-08, 18:16:09
(This post was last modified: 2010-04-08, 18:16:59 by jhondavis.)
Code:
line 40 $crumbs .= "<li><a href='$pageURL'>".ucfirst(str_replace('-',' ',I need to reference written in Russian))."</a></li>";
Posts: 1,928
Threads: 88
Joined: Apr 2010
2010-04-11, 05:10:13
(This post was last modified: 2015-02-20, 22:58:42 by Oleg06.)
we completed the work together
Posts: 1
Threads: 0
Joined: Mar 2010
Hello, Oleg06, I can't download your file, would you please reupload again?
Posts: 1,928
Threads: 88
Joined: Apr 2010
corrected
Posts: 20
Threads: 8
Joined: Nov 2009
Oleg06 Wrote:corrected
Þ ÑÂÿðÑÂøñþ ôруöøщõ
Posts: 1,928
Threads: 88
Joined: Apr 2010
ýõ ÷ð чтþ
Posts: 9
Threads: 4
Joined: Aug 2009
thanks @Oleg06 for updating plugin great work plugin url is also updated.
Posts: 2
Threads: 0
Joined: Nov 2010
You might want to change the for loop. I don't think it is displaying correctly...
Display:
Breadcrumbs: Home (NO SEPARATOR HERE) Welcome to GetSimple! » About
Code:
foreach($url_array as $url) {
if( $code_dir['0'] != $url) {
$data = getXML(GSDATAPAGESPATH . $url.".xml");
$pageURL .= $data->url.'/';
$crumbs .= "<li><a href='$pageURL'>".ucfirst($data->title)."</a></li>";
}
if($i != $count)
$crumbs .= '<li> '.$settings_value['separator'].' </li>';
$i++;
}
I changed my'n to this.
Display:
Breadcrumbs: Home » Welcome to GetSimple! » About
Code:
foreach($url_array as $url) {
if( $code_dir['0'] != $url) {
$data = getXML(GSDATAPAGESPATH . $url.".xml");
$pageURL .= $data->url.'/';
$crumbs .= '<li> '.$settings_value['separator'].' </li>';
$crumbs .= "<li><a href='$pageURL'>".ucfirst($data->title)."</a></li>";
}
$i++;
}
================================
My Template Code:
Code:
<ul id="breadcrumbs"><li id="active">Breadcrumbs: </li><? get_breadcrumbs(); ?></ul>
My CSS Code:
Code:
#breadcrumbs li {
display: inline;
list-style-type: none;
float: left;
margin: 0px 5px 0px 2px;
}
Posts: 1,928
Threads: 88
Joined: Apr 2010
Posts: 45
Threads: 12
Joined: Nov 2010
Posts: 29
Threads: 5
Joined: Jan 2011
Hello,
This plugin break my admin. When I upload it and I go to admin, I have a blank page... When I delete the plugin, admin work.
If you know how I can solve this problem...
Thank you
Posts: 2,094
Threads: 54
Joined: Jan 2011
Posts: 1,928
Threads: 88
Joined: Apr 2010
Posts: 29
Threads: 5
Joined: Jan 2011
Nobody have my problem with this plugin ?
I enable log. When I put the plugin in GS folder plugin, I have this error :
Code:
Parse error: parse error in D:\www\plugins\breadcrumbs.php on line 144
Problem... Line 144 is the last line... And there are nothing write...
Thank you for help.