Keyword

K2 Framework library...exists?

  • sortby
  • sortby's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago #149423 by sortby
K2 Framework library...exists? was created by sortby
Hello guys,
let me say I'm quite new of K2 development, but I have seen is a great component, so i would love to play with that.
Is there a library, dom parser, methods list, to call K2 objects without db/query access?
I have searched around but did-t find nothing interesting yet!

Many thanks
Frank

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 10 months ago #149425 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Framework library...exists?
A new data layer It will be introduced in v3.
You can find an example here: github.com/kricore/Advanced-templating-with-K2/blob/master/_inc/datal-layer.php

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

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

  • sortby
  • sortby's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago - 8 years 10 months ago #149433 by sortby
Replied by sortby on topic K2 Framework library...exists?
Great to hear that Krikor!
I will try as soon as it arrives...in the meantime let me ask you how to solve a small thing.
I need to get the 'itemTitle' without using queries.
So after many trials...I was wondering why not use the main code of K2 item to load the page title.
So I have inserted the code below into a module as plain php, this module is loaded into a K2 article so I think there is no need to load >>required/import and so on...but maybe I have done some general mistakes.
<?php if($this->item->params->get('itemTitle')): ?>
	  <!-- Item title -->
	  <h1 class="itemTitle">
			<?php if(isset($this->item->editLink)): ?>
			<!-- Item edit link -->
			<span class="itemEditLink">
				<a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>">
					<?php echo JText::_('K2_EDIT_ITEM'); ?>
				</a>
			</span>
            </h1>
			<?php endif; ?>
	<?php echo $this->item->title; ?>

For this reason At this stage I was asking if there where a direct access to object like 'itemTitle' or why the standard k2 item portion for itemtitle doesen-t work into another part..
Thanks for your help!
Last edit: 8 years 10 months ago by sortby. Reason: mistake

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 10 months ago #149442 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Framework library...exists?
It will not work outside the component area.
If you do not want to query the db, and you simply want to display some items, you can use the K2 Content module.

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

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


Powered by Kunena Forum