Keyword

[SOLVED] K2 Catalog Mode - Read More on Category Intro Text

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 7 months ago #141369 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Catalog Mode - Read More on Category Intro Text
Let me know how it went.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 6 months ago #142160 by alexp
Hello,

I think we might be getting stumped here on terminology.

(Krikor) "If the Home / Main Category / Subcategory / are all menu items then you can add a child called Statement.
It will appear on the breadcrumbs (if you are using mod_breadcrumbs) and the url as / Main Category / Subcategory / alias even if it belongs to another category."

- yes, Home and Main Category are both in the Menu Manager as Menu Items. But Subcategory is not. It is below the Main Category.
- yes, we are using mod_breadcrumbs

Can you define what you mean by a "child" in this case?

This is what we tried: (we understand now that this is not what you meant)
- we created a Sub-subcategory below Subcategory
- created a Statement Item, belonging to new Sub-subcategory
- we linked the read more to that Statement Item
- when viewing that Statement Item the breadcrumbs is incorrect. As now a step back in breadcrumbs takes viewer to sub-subcategory page. Instead subcategory page. Where all the items are.

The concept of an '"alias" to the Statement Item makes sense and seems could be our solution. But how do we create the "child" that we link to?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 6 months ago #142186 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Catalog Mode - Read More on Category Intro Text
Hello,

If you want a different path in your breadcrumbs than that of your K2 structure you need to map each category AND subcategory in menu items.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 6 months ago #142210 by alexp
Thanks Krikor, we are going over how we've structured menus items. Will report back.

Maybe here's another way to pose/approach the problem.

Is this possible: within a subcategory, can an Item be created and published, but completely prevented from showing on the subcategory page with the other Items, and also prevented from showing up when the viewer navigates through the catalog Items in that subcategory?

So essentially the Item exists (published), it contains the full text of the intro text on the subcategory page, but the only access to it would then be a hard coded link after the intro text at top of the subcategory page? And because it's part of that subcategory, the breadcrumbs works the same as all the other Items.

If possible, this could be easy for the client to do, within the K2 structure. Allowing them to create the intro text on the subcategory page, a hard coded read more link to an Item displaying the full text, and navigation back to the subcategory page via breadcrumbs.

To demonstrate again, our set up will be basically the same as the GetK2 Catalog demo page:
demo.getk2.org/catalog/content/17-women-s-collection
In comparison, the intro text at the top (Women's Collection) would have a hard coded read more link to a new item that would contain the full text (only text). But that item would not present with the other catalog (clothing) items below and would not present when the viewer navigated through those catalog items. So that when navigating through the catalog items the viewer doesn't see a Item page filled with just text (no product/image).

Is this a possibility?

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

More
7 years 7 months ago - 7 years 7 months ago #160317 by Geoff R
For what it's worth, I now have IntroText working on SubCategory descriptions! It was a simple tweak to the K2 category.php template (best done in an override), as follows:

The file: /components/com_k2/tempaltes/default/category.php

or better, override the above file by copying it to your template folder:
/templates/[your template folder]/html/com_k2/templates/default/category.php

Go to line 109 and replace

<!-- Subcategory description -->
<div><?php echo $subCategory->description; ?></div>

with this:

<!-- Subcategory description -->
<div><?php
// EDIT TO INCORPORATE INTROTEXT INTO SUBCATEGORIES, IF EXISTS
$subCatIntrotext = array_shift(explode('<hr id="system-readmore" />', $subCategory->description));
echo $subCatIntrotext;
?>
</div>

Now you can use the usual Joomla READMORE break in the Category Description field where you want to separate the introtext from the fulltext.
i.e., using <hr id="system-readmore" />

At least it works for me ;-)

NOTE: This doesn't include the "Read More" button, but that shouldn't be too hard to add to the above code if needed.

Hope it helps.

cheers,
Geoff
Last edit: 7 years 7 months ago by Geoff R.

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


Powered by Kunena Forum