0
Welcome Guest! Login
0 items Join Now

Module Visibility on menu-less Content Item Pages

    • William's Avatar

    Module Visibility on menu-less Content Item Pages

    Posted 17 years 9 months ago
    • Good evening all,

      I am working on a website using Joomla and the Versatility III theme, and have run into a problem that has been bugging me for several hours now. I do not believe that the problem is theme-related, so I posted this in the General section. If I was incorrect in this assumption, then I apologize in advance.

      Here is what I am attempting to do, so hopefully it can help justify my current actions and thought process:

      I’m developing a site for a foreign language school, and need to inform students and visitors where the facility is and how to get there. I have a page (content item) linked from the main menu called ‘Directions,’ with generalized traveling directions to the facility (like from the airport, from Interstate 85, etc). I also would like to have a link on that page to another page (content item) that has an iframe linked to Google Maps so that they can get step-by-step directions. Because this iframe’d page is essentially a secondary page relevant only to the primary ‘Directions’ page, I do not want it to appear on the main menu.

      I have successfully created the secondary page, and created a hyperlink to it from the primary ‘Directions’ page, but for some reason, it displays the secondary page with all of the same modules that are visible on the Home page. For example, being the Versatility III theme, it shows the ‘Advert1,’ ‘User1,’ ‘Left,’ etc. modules that I had configured.

      The thing that is really confusing me, though, is that under the Modules administration area, each of the modules that were erroneously appearing on my secondary ‘Directions’ page are selected to display only for the ‘mainmenu | Home’ item, and nothing else. In fact, my secondary ‘Directions’ page does not even show up in the “Pages / Items” list. For all other pages on my site, all are linked to the main menu, and do not display any additional modules (as would be expected).

      Am I seeing these modules appear on my secondary Directions page because it is not directly liked to a menu? Is there a way to remedy this issue without requiring a link on the menu?

      Thanks in advance for any help, advice, or tricks you might be willing to share!

      Regards,
      William :)
    • phlux0r's Avatar
    • phlux0r
    • Sr. Rocketeer
    • Posts: 199
    • Thanks: 0

    Re: Module Visibility on menu-less Content Item Pages

    Posted 17 years 9 months ago
    • Most likely you've missed to include the itemid in the secondary link to the google maps page. Without the itemid, Joomla will take the default one which is the front page and display all your front page modules...

      So in your URL to the secondary map just append &Itemid=xx where xx is the itemid of your Directions menu item. This should keep that menu item highlighted when on the google maps page.

      HTH.
    • William's Avatar

    Re: Module Visibility on menu-less Content Item Pages

    Posted 17 years 9 months ago
    • phlux0r wrote:
      Most likely you've missed to include the itemid in the secondary link to the google maps page. Without the itemid, Joomla will take the default one which is the front page and display all your front page modules...

      Thanks for your reply. It is, in fact, showing all of the front page modules, with the Google Map iframe in the tiny main content area.

      I checked the hyperlink code on the primary 'Directions' page, to the secondary (I created the link using the 'create link' button in the WYSIWYG editor, and chose the article using the section/category/etc drop down menu), and it is as follows:
      <a href="index.php?option=com_content&task=view&id=50&Itemid=1" target="_self">click here</a>.

      I modified the URL (in HTML mode) to reflect the updated Itemid to the ID of the article, as follows:
      <a href="index.php?option=com_content&task=view&id=50&Itemid=50" target="_self">click here</a>.

      and this worked beautifully! So I guess my question would be, what is the difference between the two fields in the URL 'id' and 'Itemid,' and what is the appropriate way to create a link to another content item using Joomla's WYSIWYG editor? Out of curiosity, I checked to see what ID=1 was, and it was an unpublished article that was initially installed with the template.

      Thanks again for the help!

      - William
    • phlux0r's Avatar
    • phlux0r
    • Sr. Rocketeer
    • Posts: 199
    • Thanks: 0

    Re: Module Visibility on menu-less Content Item Pages

    Posted 17 years 9 months ago
    • So I guess my question would be, what is the difference between the two fields in the URL 'id' and 'Itemid,' and what is the appropriate way to create a link to another content item using Joomla's WYSIWYG editor?

      The id is the id of the content item in the database, the Itemid is the notoriously problematic id that Joomla uses to figure out where you are in your site structure and which menu item to highlight.So Itemid has to do with your menu rather than the content item.

      As you can see, at first you specified the Itemid as 1 which is the front page Item id by default hence you had all the front page modules showing.

      If you really want to know more about the Itemid, there are big discussion about it on the joomla.org forums.
    • William's Avatar

    Re: Module Visibility on menu-less Content Item Pages

    Posted 17 years 9 months ago
    • phlux0r wrote:
      The id is the id of the content item in the database, the Itemid is the notoriously problematic id that Joomla uses to figure out where you are in your site structure and which menu item to highlight.So Itemid has to do with your menu rather than the content item.

      If you really want to know more about the Itemid, there are big discussion about it on the joomla.org forums.

      I'll definitely take a look at the Joomla forums to learn more about it. You've pretty much told me everything I need to know, so thank you! I just find it odd that the 'hyperlink' feature in Joomla's editor sets the Itemid rather than the id itself. Oh well, I know what to do now, so it's no big deal!

      - William

Time to create page: 0.071 seconds