I am unable to get this to work correctly. After setting an MPA as the index item, this is what I get:
The list of article sections is displayed at the top of the page. This corresponds in the XML to:
nav:greetingItem/cms:item/sections
However the problem is there is no actual content shown. The XML for this in a normal MPA page is in a separate "cms:articleSectionPanel" tag, but for me this does not appear in the XML output for an index item.
Suggestion: Perhaps something needs to be added to the traversal adapter for this content type ?
(I am using 1.0.4 release, but the change is question is from rev 1167 fabrice)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks, that was exactly the problem. We are using "recent.jsp" instead of "default.jsp". I have put the extra lines into "recent.jsp" and it worked (once I had correspondingly changed the XSL as well).
Actually it highlights another problem: the reason we are using the "recent.jsp" template is because if you go to this page:
/ccm/navigation/admin/
... there is no option to set the "default" template. In our case the top-level category nodes have Portals, so we can't simply use "Inherit from parent", instead we override with the "recent items" template.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's a bit odd really - the 'default' template isn't set in the database, only as a config parameter but any others that you want to set on navigation categories need to be - this means you can't explicitly set the default template on a category unless you insert it into the database using the TemplateTool as you suggest. I don't think there are any issues with using the TemplateTool to insert entries in production - I did this to add a portal index page template.
I don't know if it helps you in this situation, but I have just committed into the trunk the change that allows categories to either inherit templates from above or use the default specified in config unless a different template is set. If you look at the latest version of ccm-ldn-navigation you should see it.
Hope this helps, Chris.....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Chris, I have just applied the patch and it seems to work well. I think this feature will be useful for us.
The only minor thing is though: even after setting inherit_templates=false, if you look on the /navigation/admin page, the Template still says "Inherit from parent" even though it's actually using the default template. Nothing's ever simple in Aplaws eh...
Steve
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah yes - I see what you mean. I should look into where the drop down list is populated - I guess it must look up templates from the db and then hard code in the extra value 'inherit from parent'. I could refer to config at that point and set the extra value to either that or 'use default' depending on config value.
Cheers, Chris......
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am unable to get this to work correctly. After setting an MPA as the index item, this is what I get:
The list of article sections is displayed at the top of the page. This corresponds in the XML to:
nav:greetingItem/cms:item/sections
However the problem is there is no actual content shown. The XML for this in a normal MPA page is in a separate "cms:articleSectionPanel" tag, but for me this does not appear in the XML output for an index item.
Suggestion: Perhaps something needs to be added to the traversal adapter for this content type ?
(I am using 1.0.4 release, but the change is question is from rev 1167 fabrice)
I think this was submitted by Magpie...perhaps they can comment?
It sounds to me as if your styling needs a tweak. You say the content is available in the XML but not visible?
No, the XML content appears when the MPA is NOT an index item (in cms:articleSectionPanel)
The problem is: once it the MPA is set to an index item, this XML content is no longer in the output.
Can you check out this revision please. It should add the missing XML. HTH.
https://aplaws.108.redhat.com/source/browse/aplaws?rev=1173&view=rev
I guess you have customised Navigation JSP template,
make sure you have included:
<define:component name="greetingItemExtraXML"
classname="com.arsdigita.london.navigation.ui.GreetingItemExtraXML"/>
like it is in default.jsp supplied by Magpie
Thanks, that was exactly the problem. We are using "recent.jsp" instead of "default.jsp". I have put the extra lines into "recent.jsp" and it worked (once I had correspondingly changed the XSL as well).
Actually it highlights another problem: the reason we are using the "recent.jsp" template is because if you go to this page:
/ccm/navigation/admin/
... there is no option to set the "default" template. In our case the top-level category nodes have Portals, so we can't simply use "Inherit from parent", instead we override with the "recent items" template.
Looking at this lack of ability to set the "default" navigation template:
I have fixed this on our "development" Aplaws by inserting an entry in the nav_templates table, by running this command:
ccm-run com.arsdigita.london.navigation.TemplateTool /packages/navigation/templates/default.jsp "Default"
Can anyone suggest a reason why I shouldn't do this on our live system?
Shouldn't Aplaws create this entry upon first installation?
Hi Steve,
It's a bit odd really - the 'default' template isn't set in the database, only as a config parameter but any others that you want to set on navigation categories need to be - this means you can't explicitly set the default template on a category unless you insert it into the database using the TemplateTool as you suggest. I don't think there are any issues with using the TemplateTool to insert entries in production - I did this to add a portal index page template.
I don't know if it helps you in this situation, but I have just committed into the trunk the change that allows categories to either inherit templates from above or use the default specified in config unless a different template is set. If you look at the latest version of ccm-ldn-navigation you should see it.
Hope this helps, Chris.....
Thanks Chris, I have just applied the patch and it seems to work well. I think this feature will be useful for us.
The only minor thing is though: even after setting inherit_templates=false, if you look on the /navigation/admin page, the Template still says "Inherit from parent" even though it's actually using the default template. Nothing's ever simple in Aplaws eh...
Steve
Ah yes - I see what you mean. I should look into where the drop down list is populated - I guess it must look up templates from the db and then hard code in the extra value 'inherit from parent'. I could refer to config at that point and set the extra value to either that or 'use default' depending on config value.
Cheers, Chris......