We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Navigator module (navigation builder)

Development and Programming

Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

I think it should work for categories by commenting out the following lines:

In “mod.navigator.php” (line 321 - 323)

$url = $FNS->create_url($url);
$tagdata = $TMPL->swap_var_single($key, $url, $tagdata);
break;

In “mcp.navigator.php” (line 752 - 754)

}
else
{

Hope this helps.

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

almost a riddle (but I don’t know its answer)

This code (Navigation Module)

{exp:navigator group="4" backspace="6"}
<a href="http://{nav_url}/">{nav_title}</a>

{/exp:navigator}

gives

Link1
Link2
Link3
Link4

But if I want to get the following table:

| Link1 | Link2 | Link3 |
| Link4 |

(w/o borders)

Can this Module do such tables? I think it can’t. But maybe it can.

P.S. http://www.latvija.lv/EN/WebLinks/State/

       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

No, you’d have to use php to accomplish that.

You could do this another way by giving the link blocks a fixed width, and floating them to the left, inside a fixed width container.

Example: (I’m using inline css for this example)



Make sure you clear the float!

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

Thanks! Very useful module.

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

Now today’s Menu Items show:

Notice: Undefined index: 4.48 in /.../.../public_html/.../modules/navigator/mcp.navigator.php on line 736

Notice: Undefined index: 4.48 in /.../.../public_html/.../modules/navigator/mcp.navigator.php on line 736

...

in

CP Home  ›  Modules  ›  Navigator  ›  Item Management

But I see after ‘edit’ and ‘Update Item’ these Notices disappear one by one.

I don’t know what that is. But FYI.

Thanks for the module.

EDITED:

I think I understood why there were these notices.

I deleted Template (to “rename” it) that was used in Edit Item.

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

FR: Edit Item uses ‘Cxx’ in the Category field. ‘Cxx’ aren’t very beautiful.

I’m trying to use Category Name in URL. And I’ll use the Name as a variable to localize the site.

I think Navigator should also have a checkbox to use Category Names.

       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

sigork,

The module inherits the preference you set in “CP Home › Admin › Global Weblog Preferences”. So, if you use Category names for your site, so will the module.

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

Thanks for the reply.

Yes, I tried that. But in this case I MUST add the ‘category’ word (Category URL Indicator) in the next field. I don’t like to see this “additional” word in URL.

If you set the above preference to “yes” you must choose a reserved word. This word will be used in the URL to indicate to the weblog display engine that you are showing a category.
       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

Use another plugin to replace it?

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

Now I use your module, but with the full path as “Custom URL (Template, Category and Entry Title will be ignored)”.

P.S. And now I see maybe this FR is not important because I see I won’t use Categories at all. I use Segment 4. That means if I use Categories, I should enter them twice: as a Segment in the Navigator and as a Category in the Categories. This way is not logical. I should enter them one time, that means they won’t be shown in the Category field in the Navigator.

So, the only way is to use Custom URL (I do that now).

EDITED:

No, Categories should be used also. Because ‘exp:weblog:entries’ uses them (category=).

So, I should enter the same data twice. As Categories only to select Entries in ‘exp:weblog:entries’ :(

I hope I’ll have a better idea (how to use ‘exp:weblog:entries’ without Categories to enter Segment 4 only once, in Navigator only).

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

Dear Cocoaholic,

I’ve completed a personal project (a links catalog) with your Navigator module.

But there’s a small programming problem.

The module shows all Item Titles. But this menu can be used in several languages/templates, e.g.,

{exp:navigator group="<?php echo $nv_grp; ?>"}

<a href="http://http:/lv/weblinks/{segment_3}/{nav_title}/">{exp:localized_text string="{nav_title}" file="my_localized_text" language="latvian"}</a></div>

{/exp:navigator}

and that would be desirable not show some Items in some languages, e.g., not to show some specific info that is not actual for foreign visitors.

For example, to write in Edit Item somewhere in a field (e.g., Description) that this Item should not be shown in exp:navigator for some parameters.

Maybe there’s an idea how to do that?

Thanks.

       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

You can use conditionals.

In this example I used the Description field to specify if an item is for a specific language only, if the item should be shown to all countries I left the Description field blank so it will show the default language, in my case ‘english’. This might not exactly be what you had in mind, but I’m pretty sure you can use EE’s conditionals to do the job.

{exp:navigator group="<?php echo $nv_grp; ?>"}

{if nav_description == ""}

<a href="http://http:/en/weblinks/{segment_3}/{nav_title}/">{nav_title}</a></div>

{if:elseif nav_description == "fr" AND segment_1 == "fr"}

<a href="http://http:/fr/weblinks/{segment_3}/{nav_title}/">{exp:localized_text string="{nav_title}" file="my_localized_text" language="french"}</a></div>

{if:elseif nav_description == "lv" AND segment_1 == "lv"}

<a href="http://http:/lv/weblinks/{segment_3}/{nav_title}/">{exp:localized_text string="{nav_title}" file="my_localized_text" language="latvian"}</a></div>

{/if}

{/exp:navigator}
       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

I tried to use a plugin to compare {nav_description} and {segment_1}.

For example, {nav_description} has en|de, and if {segment_1} is fr

{exp:compare long="{nav_description}" short="{segment_1}"}

http://ellislab.com/forums/viewthread/37029/

gives ‘0’.

But this code

{if {exp:compare long="{nav_description}" short="{segment_1}"} == "0"}

doesn’t work.

It works only in this combination:

{exp:compare long="{nav_description}" short="{segment_1}"}
{if {exp:compare long="{nav_description}" short="{segment_1}"} == "0"}

Now I see the only way is to edit the Module not to show some Menu Items for some parameters.

       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

Feel free to edit the Module 😊

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
18 years ago
Sue Crocker's avatar Sue Crocker

Cocoaholic, any chance to add a clone a group? I’m building 5 or 6 menus at a time, and the only thing that’s different is one class per menu.

       
1 2 3 4 5 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.