Posts: 2,094
Threads: 54
Joined: Jan 2011
Posts: 524
Threads: 48
Joined: Mar 2011
Hi,
thanks for your I18N plugin and the different functionality it provides!
I have a question about the breadcrumbs: on my start page, "Start » Start" is shown which is undesirable for me. How can I circumevent this? I'm no programmer, but willing and able to edit the plugin. The start page is a special case it seems.
Keep up the good work!
Posts: 2,094
Threads: 54
Joined: Jan 2011
2011-03-10, 21:51:59
(This post was last modified: 2011-03-10, 21:53:35 by nime.)
polyfragmented Wrote:I have a question about the breadcrumbs: on my start page, "Start » Start" is shown which is undesirable for me. How can I circumevent this? I'm no programmer, but willing and able to edit the plugin. The start page is a special case it seems.
In your template you can add the slug name of your current page as class in a "content"-div like follows:
Code: <div id="content" class="<?php echo return_page_slug(); ?>">
<div class="breadcrumbs">
<a href="<?php echo find_url('index',null); ?>">home</a>
<?php get_i18n_breadcrumbs(return_page_slug()); ?>
</div>
<h1 id="pagetitle"><?php get_page_title(); ?></h1>
<?php get_page_content(); ?>
</div>
Then you can add a CSS-rule in your css file that hides the breadcrumbs on the index page:
Code: #content.index div.breadcrumbs {
display: none;
}
You can use the same approach to e.g. make the font on your legal info ("Impressum") page smaller, etc.
Posts: 346
Threads: 27
Joined: Sep 2010
2011-03-11, 06:24:54
(This post was last modified: 2011-03-11, 07:32:11 by logonsf.)
An alternative solution is this:
Code: <div class="breadcrumbs">
<a href="<?php echo find_url('index',null); ?>">Home</a>
<?php
if (return_page_slug()=='index')
echo " ";
else
<?php get_i18n_breadcrumbs(return_page_slug()); ?>
?>
</div>
Change the 'index' on line 4 to the slug of whatever page is your start page. This negates the need to hide the breadcrumbs with CSS, and ensures that you still have that initial start link on all pages in a uniform format (albeit with the redundant second link being removed on your desired page). Hope that helps!
* edited in response to the below post*
Code: <div class="breadcrumbs">
<a href="<?php echo find_url('index',null); ?>">Home</a>
<?php
if (return_page_slug()=='index')
echo " ";
else
get_i18n_breadcrumbs(return_page_slug());
?>
</div>
Posts: 2,094
Threads: 54
Joined: Jan 2011
Angryboy Wrote:An alternative solution is this:
...
Remove the <?php ?> around get_i18n_breadcrumbs, and then a bit shorter:
Code: <div class="breadcrumbs">
<a href="<?php echo find_url('index',null); ?>">Home</a>
<?php if (return_page_slug()!='index') get_i18n_breadcrumbs(return_page_slug()); ?>
</div>
But as we are on the home page, we don't really need the home link...
Posts: 346
Threads: 27
Joined: Sep 2010
2011-03-11, 07:30:45
(This post was last modified: 2011-03-11, 07:36:47 by logonsf.)
Ah thanks for fixing that So much shorter! ( I was lazy when I removed the navigation parameters from the coding and just copied from the original, forgetting to remove the <?php?> bits. Bad move on my part xD)
I keep that home link there so that it is always at the beginning of any breadcrumb trail. It's just for consistency's take (since that breadcrumb structure (at least for my site) stays the same for all pages). Plus there can still be reasons to click on that home link (such as being directed to the second page of news which is still on the 'index', but not having a back button - an extra home button makes the link very easy to see).
Posts: 524
Threads: 48
Joined: Mar 2011
Thanks a lot you two! I am now using the optimised short version, works like a charm! Cheers!
Posts: 54
Threads: 3
Joined: Nov 2010
Quote: on my start page, "Start » Start" is shown which is undesirable for me. How can I circumevent this?
Since you all got to PHP in the end, isn't it wiser to pach the plugin itself ?
Posts: 524
Threads: 48
Joined: Mar 2011
2011-03-17, 19:01:31
(This post was last modified: 2011-03-17, 19:04:27 by infos.media.)
mvlcek,
is it possible to somehow account for accesskeys and taborder in your menu system? I'm going to create a website which will probably have a fair share of elderly users, possibly disabled ones. Mousework can be hard for those.
I guess that tab order could be pulled from the priority of the main pages, couldn't it? As far as accesskeys go, I'm currently at a loss as how to implement those. Maybe a custom field in page options which can then be tied into the plugin link structure? Would try it out, but custom fields still don't work here.
As an aside, I am currently styling a 2-level navigation which works nicely. Your use of "currentpath" is cool. This way you can make sure the parent stays marked as being "active". Kudos.
Posts: 2,094
Threads: 54
Joined: Jan 2011
polyfragmented Wrote:mvlcek,
is it possible to somehow account for accesskeys and taborder in your menu system? I'm going to create a website which will probably have a fair share of elderly users, possibly disabled ones. Mousework can be hard for those.
I guess that tab order could be pulled from the priority of the main pages, couldn't it? As far as accesskeys go, I'm currently at a loss as how to implement those. Maybe a custom field in page options which can then be tied into the plugin link structure? Would try it out, but custom fields still don't work here.
Browsers allow you to tab through all links and fields. All navigation links are consecutive in the correct order - nothing to do here. Maybe you should just set the focus to the "home" navigation item, e.g. if your navigation is wrapped in a <ul id="menu"></ul>, with Javascript:
Code: $('#menu .index a').focus()
As to the access keys: they need some (implicit) custom field and support from the i18n plugin, but do you really think it's easier for elderly people to press alt-accesskey then to use the mouse?
Posts: 524
Threads: 48
Joined: Mar 2011
mvlcek Wrote:Browsers allow you to tab through all links and fields. All navigation links are consecutive in the correct order - nothing to do here. In reply to what I wrote first that's right. I didn't think the tab order thing through, the priority already puts the links in the correct order of course. After thinking on it for a bit I realised it's not really what I wanted to express: What I really wanted to ask for are user configurable access keys and tab order.
mvlcek Wrote:As to the access keys: they need some (implicit) custom field and support from the i18n plugin, but do you really think it's easier for elderly people to press alt-accesskey then to use the mouse? For some it is since they can't use a mouse anymore because their coordination and precision with that input device are too far off. Having said that there are keyboards with bigger keys so those people can hit the keys more easily than with a normal-sized keyboard.
I'm still new to accessibility, but having the two asked-for features might improve general accessibililty. There's more to it than acceskeys and tab order, but from reading up on it, those seem to be a good start.
Posts: 2,094
Threads: 54
Joined: Jan 2011
polyfragmented Wrote:What I really wanted to ask for are user configurable access keys and tab order.
User: the administrator (using the GetSimple administration) or the elderly people accessing the site?
Posts: 524
Threads: 48
Joined: Mar 2011
mvlcek Wrote:User: the administrator (using the GetSimple administration) or the elderly people accessing the site? Admin-configurable.
Posts: 2,094
Threads: 54
Joined: Jan 2011
polyfragmented Wrote:mvlcek Wrote:User: the administrator (using the GetSimple administration) or the elderly people accessing the site? Admin-configurable.
I can see reason behind the accesskeys, but you have to keep in mind they would only work for menu items that are displayed (first level, remaining levels depending on current page).
But why would you want to create a different tab order for the navigation - or is it just have a few items with tab order set? In any case this would also only work for visible navigation entries.
Posts: 18
Threads: 6
Joined: Jul 2011
Hello
im trying to style my breadcrumb and would like to know how to remove the separator "»"
also i would like to remove the current page link and leave just the name.
Thanks
Posts: 2,094
Threads: 54
Joined: Jan 2011
amaurib Wrote:Hello
im trying to style my breadcrumb and would like to know how to remove the separator "»"
also i would like to remove the current page link and leave just the name.
Thanks
For this you have to use return_i18n_breadcrumbs and output/style the breadcrumbs yourself. See top of plugin file for documentation.
Posts: 184
Threads: 20
Joined: Apr 2010
can i use breadcrumbs right inside a page instead of a template? how?
|