Keyword

Some queries on setting parameters on for featured articles (on K2 homepage items) - edited

  • Martin Dean
  • Martin Dean's Avatar Topic Author
  • Offline
  • New Member
More
13 years 11 months ago #89029 by Martin Dean
Hi Folks,I am currently trying to work my way around my first website implementation using K2, (although we have done many with J1.5 standalone).In this instance I am looking to have featured articles showing on the homepage, in the article space usually reserved for the com_content featured homepage articles - in otherwords akin to the default Joomla behaviour.However in the in the first article I want to show 80 words or so, followed by a readmore link. The next four featured articles I then want to show as clickable links.I am looking for all of these links to open on their own page, with an associate menu item based on their category so I can set relevant modules for display based on the associated menu item.I am nearly there but not quite :)This is what I have done so far:I have set-up a hierarchy of categories, something like this (very simplified):HomeLive      - Articles -                            - topic1                           - topic2Demo   - Articles -
                           - topic1
                           - topic2I have then created a K2 category menu item (home) linking to the home category, and set it as default within the menu. Under the properties of the home category I have set it as to only show Featured articles, 1 leading, 0 primary, 0 secondary, and 4 titles, order by most recent.I then have items created, in differing categories (all children of live/articles), some of which have the attribute 'Set Featured' turned on.My menu structure is more akin to this however:Hometopic1  -  Sub1               Articles                               - articlesub1                               - specificlinktoanotherk2item               Sub2 topic 2 -  Sub1               ArticlesWhen I look at the homepage, this seems to work at a basic level.I can see the featured article, and the titles.However I have the following issues!How can I set the featured articles, to only show the first X words (i.e. 80) and then present a read more link ?(I have tried 'itemview options in category listings', Introtext Show and Introtext Word Limit - I see no change on the frontend)How can I control the active menu (and therefore the associated modules and positions that display) when the title or readmore link is used ?  The purpose here is to open the article in the correct topics articles submenu (see menu!) so I can have topic specific modules loaded when the article opens in a new  page (i.e. not the home page).(In vanilla Joomla I would be using itemid/articleid in my links)I also have a couple of other basics that may prove related!I am currently using the default K2 template - is there anything documenting the MVC architecture so I can start looking at overrides ? (I am familiar with mvc from magento customisations, not really used it in a Joomla context for template overrides)I have also just set-up another testbed website with J1.5.20 and the latest K2, I will be creating an approximation of my above post with the default templates and can share admin details if anybody would care to take a closer look!test.idlegold.co.ukMany thanks in advance for any assistance! Martin

Please Log in or Create an account to join the conversation.

  • Martin Dean
  • Martin Dean's Avatar Topic Author
  • Offline
  • New Member
More
13 years 11 months ago #89030 by Martin Dean
Hi folks, sorry to bump, I was hoping some kind soul might point me in the correct direction overnight!

Does anybody have any brainwaves ? I am now back on with the exact same task this morning!

Please Log in or Create an account to join the conversation.

  • Martin Dean
  • Martin Dean's Avatar Topic Author
  • Offline
  • New Member
More
13 years 11 months ago #89031 by Martin Dean
Ok Folks, I have fleshed this out, some more and found part of my problem, and partial solutions, but not the entire solution. I am probably just missing something however :)

I can see three (possibly 4) ways to try to achieve the above. I have tried to include them all in the demo site for the purpose. At time of writing this is available here:

site: test.idlegold.co.uk
admin: test.idlegold.co.uk/adminstrator
user: admin
pass: test12345

Please feel free to take a look / make suggestions!

Homepage type 1 -- dedicated stand alone category, link to category, item parameters defined in category.

Wordcount works! I can now show just the first 80 words or so :)
Content gets duplicated :( the articles already exists in their own categories, and need to be in those locations for category browsing
I suspect there is nothing to hook into in terms of active menu ? (after all they are now not in subfolders of topic1/topic2)

This might be viable if their is a way to make an item a member of two cats ? or a possible way to create an 'alias' type category ? (meaning a duplicate of another category, inherits its content at all times, but has its own parameters).

Homepage type two -- link to the parent category 'articles', turn off inheritance on the child cats (topic1/topic2), set parameters on the articles category directly, catalogue mode 'No' so articles in child cats are viewed


Wordcount is ignored - it shows the entire first article :(
No duplication of articles :)
May cause a problem, as later I suspect I would differing need articles in the articles root cat and not want then displayed on the homepage :(


I thought I had the solution here, sadly it seems not!

Homepage type 3: Link to both of the child cats (topic1/topic2) at once, use the menu item to set parameters.

No Duplication :)
Appears to be no way to set wordcount ? :(
Menu Context still an issue


Homepage 4 ? (possibly!) -- I am just looking at this trying to understand how the 'latest from multiple categories' link type differs from option 3 with latest set as the ordering type ?


The other difficulty is with menu assignments - using any of the options above, the articles (item) links from the front end, seem to load the articles on a stand alone page - that is fine, but I need to set the active menu to the correct article sub menu (topic1/articles or topic2/articles) that the article exists within. This is for the purpose of loading the correct modules via menu id. Vanilla joomla this would just be specifying an item id in the link ?

I also assume this would be another (harder to resolve) options with using option one above ?

I hope I am not boring people too much with this wall of text - my 10 minute job last night has now turned into several hours of work to test all of this to this point, and I hope the conclusions so far are usefull at least, but my dilemma remains.

At least now I understand the question better! So:

How do I get a working wordcount introduction and readmore link, with items loaded in the context of the correct menu on the homepage, without duplication ?

Thanks again,

Martin

Please Log in or Create an account to join the conversation.

  • Martin Dean
  • Martin Dean's Avatar Topic Author
  • Offline
  • New Member
More
13 years 11 months ago #89032 by Martin Dean
Ok, Some more findings!

I wonder if anyone else is actually reading this ? ^^

Conclusion One:

If a menu link points to a single parent category, and that category is allowed to load items from a child category, the parameters of the child category are used to display the item - NOT those of the parent category (i.e. the one targeted in the menu).

This can be evidenced via homepage type 3. The category Articles has a read-more of 80 words, the child had no read-more set. No read-more was used. Changing the child's read-more to 6 words, causes it to load with on the homepage link with a 6 word read-more.

Whereas this might solve a short term issue (getting the read-more working without duplication of content into a dedicated category), it then presents the issue of needing differing presentation settings for the same content on the homepage and on the articles submenu for the topic (category) via the menu.

Is there any way to keep the parameters of the parent category active when displaying a child item, when the said parent is the linked category in the active menu item ?

if not, how would I achieve differing presentation parameters without duplicating content ?

Conclusion Two

Where the parameters of the menu item are those in play (for leading etc), I guess you are not in category browse mode ? Thus the setting for read-more (which is only against the Category) are not implemented. Does anyone know how I can get a functioning read-more via articles loaded from homepage link type 2 ? (menu with multiple cats selected)


Arrrg!
Ok, I feel slightly better now.

All that aside my biggest issue remains how to set an active menu item when loading content from a K2 generated link via the featured articles loaded on the homepage - any takers ?


I have put enough time into this now that I really need to come up with a fully viable solution to the above conundrums! I do hope I have given the information pretty comprehensively here, and by linking a demo site set up expressly to show these queries/findings I am hoping someone may want to point out any errors or possible solutions.

Thanks Again,

Martin

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #89033 by Refrito
Hi Martin, I am addressing the same issues you describe in your thread. My main problem is how to set the layout of articles in a featured articles list. nothing seems to work.

 

I'm not very optimisting in finding a solution given that it seems that your story didn't have a happy ending (or at least you didn't publish it) and there were no replies to it.

 

Anyway, if you have any info that could help me it would be much appreciated.

 

Cheers.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum