The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Tue Nov 15, 2011 3:00 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 16, 2007 2:33 am
Posts: 44
hello all,
very psyched about alternative menu items, now if I could just make them work! starting off easy, just want to create an alternative item for a single article

copied both

/components/com_content/views/article/tmpl/default.php
/components/com_content/views/article/tmpl/default.xml

updated to

/templates/myTemplate/html/com_content/article/myItem.php
/templates/myTemplate/html/com_content/article/myItem.xml

uploaded. I can see the new menu item appears. when I choose it the internal URL gets build looks like this

Code:
index.php?option=com_content&view=article&layout=myTemplate:myItem&id=1


so I know it's getting picked up at least partially, but it still uses the default.php layout. obviously, I've poured over http://docs.joomla.org/Layout_Overrides_in_Joomla_1.6. the only place I've deviated from the instructions is by editing the menu item title directly in myItem.xml. because I don't use any language overrides. updated it to this...

Code:
<layout title="Single Article (Custom)" option="com_content_article_view_default_option">
   <help
      key = "JHELP_MENUS_MENU_ITEM_ARTICLE_SINGLE_ARTICLE"
   />
   <message>
      <![CDATA[com_content_article_view_default_desc]]>
   </message>
</layout>


you don't have to use language overrides to use alternative layouts right? what am I missing?

thanks in advance!


Top
 Profile  
 
PostPosted: Mon Jan 16, 2012 11:53 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Jul 29, 2009 8:20 am
Posts: 17
Did you ever get the answer to this? I have the same problem.


Top
 Profile  
 
PostPosted: Mon Jan 16, 2012 3:51 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 16, 2007 2:33 am
Posts: 44
yup. got both working. sorry, I should have posted that here...

here's the post where I worked through it. basically it works as published. I just needed to understand it better

viewtopic.php?f=579&t=578662


Top
 Profile  
 
PostPosted: Mon Jan 16, 2012 4:10 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Jul 29, 2009 8:20 am
Posts: 17
Hmm,
That's where I've been looking too - and I've been tracking my progress - or lack of - there...
I'm still a bit stuck. I can get the menu item to show up, but it only wants to use the default php files - either ones in the original directory, or ones in my html directory, but only files called default...
I can't figure out what I'm missing to get it to use my own files.


Top
 Profile  
 
PostPosted: Mon Jan 16, 2012 4:21 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 16, 2007 2:33 am
Posts: 44
if it were me, I'd start with a fresh install. it's probably some customization you've done that's messing it up. just my 2 cents. good luck.


Top
 Profile  
 
PostPosted: Mon Jan 16, 2012 4:33 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Jul 29, 2009 8:20 am
Posts: 17
I'd give that a go, but it already is pretty much a fresh install. Only installed last week, and haven't customised anything - except for my template and attempting to get over-rides to work (and the lang file mentioned in the other thread - but that's easily fixed)

I saw that you solved your problem by checking that no other menu items were linked. Other than checking through the actual menu items, there's no other place these can be linked is there? Something is definitely still inserting the 'default' values somewhere


Top
 Profile  
 
PostPosted: Tue Jan 17, 2012 11:18 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Jul 29, 2009 8:20 am
Posts: 17
Solved:
it's seemingly a bug in 'categories'
category works fine as documented, but not categories. Bit of a waste of a day yesterday then, but at least I learned something :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 



Who is online

Users browsing this forum: knightreader and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group