Hi,
I have got two new problems to solve.
Problem #1
First scenario (only one menu item):
Menu Item
Title: Category List
Type: List Of Categories (Categories View)
Tab: Page Display: Show Page Heading = Yes, Page Heading = "Category List"
Page heading shows the correct title "Category List" while in categories list.
After selecting one of the categories from the list,
the page title should be e.g. "Category Details" but it still remains "Category List".
However, In some cases it's necessary to access a particular category via a direct link.
Problem #2
Second scenario (additional menu item):
Menu Item
Title: Category 1
Type: List of Files (Category View)
Tab: Page Display: Show Page Heading = Yes, Page Heading = "Files in Category 1"
Funny: In this scenario page heading is correct in categories view AND category view,
BUT - You cannot return from category view to categories view (up button points to current view).
Regards Mike
Faulty Page Heading / No Return to Previous View
- madmetz
- Phoca Member
- Posts: 34
- Joined: 08 Apr 2019, 16:20
- Jan
- Phoca Hero
- Posts: 47887
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Faulty Page Heading / No Return to Previous View
Hi,
1) in Joomla! menu heading can be set for the menu link - but one menu link can display more views, so even if you are in categories view or category view or file view, you still in the same menu item.
2) It can happen, then if you have created menu link co categories view and menu link to category view - it will switch from menu link - category view - to menu link - categories view - so the heading will change. But this can be wrong because of aliases - it can change completely the URL - so it is always recommended to use only one menu link because of SEF.
Here is one obsolete article about menu item IDs - it is really very obsolete but in this article you can find how menu links work in Joomla!
Jan
1) in Joomla! menu heading can be set for the menu link - but one menu link can display more views, so even if you are in categories view or category view or file view, you still in the same menu item.
2) It can happen, then if you have created menu link co categories view and menu link to category view - it will switch from menu link - category view - to menu link - categories view - so the heading will change. But this can be wrong because of aliases - it can change completely the URL - so it is always recommended to use only one menu link because of SEF.
Here is one obsolete article about menu item IDs - it is really very obsolete but in this article you can find how menu links work in Joomla!
Jan
If you find Phoca extensions useful, please support the project
- madmetz
- Phoca Member
- Posts: 34
- Joined: 08 Apr 2019, 16:20
Re: Faulty Page Heading / No Return to Previous View
Hi Jan,
thanx for your reply - but this is just an explanation - not a solution.
I can agree with the second statement, to use only one menu link, because if a menu link for a category is inserted to an article everything is fine.
For the other issue I modified the following code in: /components/com_phocadownload/views/category/tmpl/default.php
The "category view" heading is now independent from any menu item and shows the content of the language variable 'COM_PHOCADOWNLOAD_CATEGORY_VIEW'.
This works fine and would work even better if it were configurable.
Regards Mike
thanx for your reply - but this is just an explanation - not a solution.
I can agree with the second statement, to use only one menu link, because if a menu link for a category is inserted to an article everything is fine.
For the other issue I modified the following code in: /components/com_phocadownload/views/category/tmpl/default.php
Code: Select all
18 if ( $this->t['p']->get( 'show_page_heading' ) ) {
19 // echo '<h1>'. $this->escape($this->t['p']->get('page_heading')) . '</h1>';
20 echo '<h1>'. JText::_('COM_PHOCADOWNLOAD_CATEGORY_VIEW') . '</h1>';
21 }
This works fine and would work even better if it were configurable.
Regards Mike
- Jan
- Phoca Hero
- Posts: 47887
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Faulty Page Heading / No Return to Previous View
But what happens when user just doesn't want to have heading "Category View" which is mostly the case.
If you find Phoca extensions useful, please support the project
- madmetz
- Phoca Member
- Posts: 34
- Joined: 08 Apr 2019, 16:20
Re: Faulty Page Heading / No Return to Previous View
Hi Jan,
Regards Mike
If a user doesn't want to have page heading in "Category View" she/he won't have it in "Categories View" either, because it's the same source. Are you sure that most users don't want to have any page heading ?Jan wrote:
But what happens when user just doesn't want to have heading "Category View"...
BTW Of course the modification of the ... default.php file was made as override.Mike wrote:
This works fine and would work even better if it were configurable.
Regards Mike
- Jan
- Phoca Hero
- Posts: 47887
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Faulty Page Heading / No Return to Previous View
Ok
If you find Phoca extensions useful, please support the project