?
avatar titanomachy
titanomachy
16 Oct 2014

Steps

Responsive menu's compatible for touch devices need a top level menu item you can click or press on to enable sub-menu functionality You do not want a hover for small screen touch devices.

To do this in Joomla with Bootstrap 3.3 I need:

  1. a top level menu item.
  2. the external URL feature
  3. a hash tag (#) as link value

If I - instead - would use an (e.g.) individual article it does not work. Users on touch devices will be redirected to that article instead of seeing the sub-menu.

Issue

The issue with the aforementioned 'solution' is that the URL for a sub-menu item has a strange format. It has a date, and a time stamp in it. Like this: example.com/2014-10-16-00-38-41/article-name.

It does not use the category in the URL, and it does not use the name of the external link as a URL. Such an URL does not tell people where the article belongs to.

An alias field, just like the other menu item types have, would solve this. Except it is not there for the "External URL" menu type.

Solution

Instead of using the date time stamp in the URL, enable the alias field in the backend for creating the URL.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
2.00

avatar Titanomachy Titanomachy - open - 16 Oct 2014
avatar jissues-bot jissues-bot - change - 16 Oct 2014
Labels Added: ?
avatar Hackwar
Hackwar - comment - 16 Oct 2014

This is written pretty complicated, where you actually only want to say: I need the alias field for external URLs to create proper URL paths. The field is hidden, please unhide it.
BTW: You could also use menu alias to achieve something similar. Create one menu item first, create the alias, point it to the first menu item, edit the first menu item and make it a child of the alias item.

avatar titanomachy
titanomachy - comment - 16 Oct 2014

That is in the title, I wanted to give some background info.

avatar mbabker
mbabker - comment - 16 Oct 2014

It was a purposeful decision but I truthfully don't remember why right now.

avatar Hackwar
Hackwar - comment - 16 Oct 2014

Just an FYI that there were 3 people in #joomla in the last 3 days with this problem.

avatar titanomachy
titanomachy - comment - 16 Oct 2014

I just tried it, and it works by filling in the alias field through Firebug. Is there a way to retrieve information about why that field is hidden?

avatar infograf768
infograf768 - comment - 16 Oct 2014

We do have a warning there and one can enter an alias if desired
"
Warning!
Leave the alias field empty if the menu item alias and the menu item linked to by the alias have the same parent.
"

avatar infograf768
infograf768 - comment - 16 Oct 2014

OOps, wrong menu type :)

avatar dgt41
dgt41 - comment - 16 Oct 2014

@Titanomachy I followed your instructions and I am able to create the needed menu. I guess you are on a multilingual site thus the date. What you can do is login in the language you need the alias and proceed as normal.

avatar infograf768
infograf768 - comment - 16 Oct 2014

The date in this case has nothing to do with multilanguage.

// Make the alias URL safe.
        $this->alias = JApplication::stringURLSafe($this->alias);

        if (trim(str_replace('-', '', $this->alias)) == '')
        {
            $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
        }
avatar titanomachy
titanomachy - comment - 16 Oct 2014

@dgt41 Yes you are correct, the website is multilingual. Indeed, on a single language site the URL is formatted as you would expect (without a date). However, a login on the multilingual website with the same language as the front-end still gives me a date.

avatar dgt41
dgt41 - comment - 16 Oct 2014

@infograf768 Sorry here it works as expected
screenshot 2014-10-16 19 14 10

screenshot 2014-10-16 19 14 19

avatar infograf768
infograf768 - comment - 16 Oct 2014

What I was trying to explain is that, for a Menu of type External URL, as the alias is always empty, a date is entered in db (see code above), multilingual or not.

avatar dgt41
dgt41 - comment - 16 Oct 2014

So the problem is that for external URL the alias doesn’t support utf-8

avatar titanomachy
titanomachy - comment - 16 Oct 2014

@dgt41 That was not what the issue is about. It is about the URL in the address bar.

2014-10-16 18_19_59-artikel 3 - pims international

and:
2014-10-16 18_23_05-pims international - administration - menu manager_ menu items

avatar dgt41
dgt41 - comment - 16 Oct 2014

@infograf768 You are absolutely correct!

@Titanomachy You just need a menu with title and alias and href #. Right?

avatar infograf768
infograf768 - comment - 16 Oct 2014

As @Hackwar says above, use the menu item alias instead of the External URL

avatar brianteeman
brianteeman - comment - 16 Oct 2014

No that won't work on a mobile device where you want to click to open the
menu
On 16 Oct 2014 17:28, "infograf768" notifications@github.com wrote:

As @Hackwar https://github.com/Hackwar says above, use the menu item
alias instead of the External URL


Reply to this email directly or view it on GitHub
#4706 (comment).

avatar dgt41
dgt41 - comment - 16 Oct 2014

@Titanomachy try this:
screenshot 2014-10-16 19 37 02
screenshot 2014-10-16 19 36 54

avatar titanomachy
titanomachy - comment - 16 Oct 2014

The menu item alias as suggested by @Hackwar works, also on mobile. At least on my end (Bootstrap 3.3). I guess the issue as posted is not an issue at all. I just used the "External URL" menu item type for something it was not intended. I'll switch to the menu alias. Thanks.

avatar titanomachy titanomachy - close - 16 Oct 2014
avatar Titanomachy Titanomachy - close - 16 Oct 2014
avatar Titanomachy Titanomachy - change - 16 Oct 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-10-16 16:38:48
avatar titanomachy titanomachy - reopen - 22 Jan 2015
avatar titanomachy titanomachy - reopen - 22 Jan 2015
avatar titanomachy titanomachy - change - 22 Jan 2015
Status Closed New
avatar titanomachy titanomachy - close - 22 Jan 2015
avatar titanomachy titanomachy - change - 22 Jan 2015
Status New Closed
Closed_Date 2014-10-16 16:38:48 2015-01-22 14:12:52
avatar titanomachy titanomachy - close - 22 Jan 2015
avatar diesl
diesl - comment - 26 Feb 2015

I came here while searching for solutions about the same issue (bootstrap mobile). Well, there is a workaround for the bootstrap problem. But the original problem when using "External URL" still exists:

The issue with the aforementioned 'solution' is that the URL for a sub-menu item has a strange format. It has a date, and a time stamp in it. Like this: example.com/2014-10-16-00-38-41/article-name.

My suggestion is to unhide the alias field. Joomla tries to be smart here, but in the end, does and can not catch all possibilities. I have not found a good argument why it is hidden and can not be changed.

@titanomachy I would suggest to reopen this issue even if your personal problem can be solved with a workaround

avatar brianteeman
brianteeman - comment - 26 Feb 2015

Did you try Joomla 3.4 - as far as I can see you can create any alias you
want to with a menu item of type External URL

On 26 February 2015 at 00:18, diesl notifications@github.com wrote:

I came here while searching for solutions about the same issue (bootstrap
mobile). Well, there is a workaround for the bootstrap problem. But the
original problem when using "External URL" still exists:

The issue with the aforementioned 'solution' is that the URL for a
sub-menu item has a strange format. It has a date, and a time stamp in it.
Like this: example.com/2014-10-16-00-38-41/article-name.

My suggestion is to unhide the alias field. Joomla tries to be smart here,
but in the end, does and can not catch all possibilities. I have not found
a good argument why it is hidden and can not be changed.

@titanomachy https://github.com/titanomachy I would suggest to reopen
this issue even if your personal problem can be solved with a workaround


Reply to this email directly or view it on GitHub
#4706 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar brianteeman
brianteeman - comment - 26 Feb 2015

See #4932 which was merged and is present in 3.4

avatar diesl
diesl - comment - 26 Feb 2015

Thanks for the information. Seems like a good timing that Joomla 3.4 has been released right now.

Add a Comment

Login with GitHub to post a comment