Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

k2 templating and zenkit question

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi there,

I want to show an extra field in a k2 category zenkit template.

Normally you would use something like

<?php if( isset($this->item->extraFields->test->value)):
echo the value
endif;?>

or use the

$this->item->extraFields->EXTRAFIELDALIASHERE->value

That is more or less, what tutorials and forums including the k2 support also suggest.

I do not get it to work as it seems that the field is empty ( (["value"]=> NULL), but I know it contains a value.
A lot of googeling lead me here www.joomlaworks.net/forum/k2-en/39244-solved-returning-the-value-of-an-extra_field-in-category_item-view?limitstart=0 which means it could be a plugin.

This makes sense as I use zenkit, which is called by a plugin and places the templates in slightly different place.

Could you
a) verify that this might be the cause and
b) any idea where to look how to change the code of the category_view to display the value of an extrafield.

Thanks a lot
  • MaMuster's Avatar
  • MaMuster
  • LIfetime Developer - Big Bamboo
  • 329 posts
  • 10 Thanks
  • Karma: 4
The administrator has disabled public write access.
Hi

This is a bit beyond my skills so will need to seek advice from a developer tomorrow on this

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
No problem. Thanks.

I could solve it in the meantime.

In general for all reading the post extrafields have to be set to display in article category view options as it is not so easy to bypass that filter so you need to change the file at the regular extrafield php, too.

I also added a call convertArray to use ids as keys in case it had to do with zenkit.

But now I have CSS problem:

I have the extrafield value in a div above the title. I want to move the dive to the left to display an event date the article is about. It is called VDate.

.VDate {
background: #4a3884 none repeat scroll 0 0;
color: white;
display: block;
float: left;
height: 80px;
margin-left: -100px;
overflow: visible !important;
padding: 10px;
position: absolute;
text-align: center;
width: 80px;
}

Everything works except the overflow visible.

This is due to an equal column setup with .equal: overflow:hidden high above in the CSS cascade. In theory it should work to

a) use a more specific selector like .column .equal . VDate
b) combine VDate with a selector with a higher hierarchy
c) add !important

None of that works. Do you have any idea how to get it to work. It is a Xero Template.
Thanks
  • MaMuster's Avatar
  • MaMuster
  • LIfetime Developer - Big Bamboo
  • 329 posts
  • 10 Thanks
  • Karma: 4
The administrator has disabled public write access.
any idea on the CSS? I still do not get it to work.

Thanks

P.S.: Maybe the post should be moved to zenkit instead of general?
  • MaMuster's Avatar
  • MaMuster
  • LIfetime Developer - Big Bamboo
  • 329 posts
  • 10 Thanks
  • Karma: 4
The administrator has disabled public write access.
Sorry I missed the css part of the question

Is there an example I can see on the site?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
No problem.

Sure: www.klalemunim.org/veranstaltungen.html

Thanks a lot!
  • MaMuster's Avatar
  • MaMuster
  • LIfetime Developer - Big Bamboo
  • 329 posts
  • 10 Thanks
  • Karma: 4
The administrator has disabled public write access.
Just checking but I get a 404 for that link

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
mmm. I do the same, but I do not.

Can you try the root and the click on the menu item?
  • MaMuster's Avatar
  • MaMuster
  • LIfetime Developer - Big Bamboo
  • 329 posts
  • 10 Thanks
  • Karma: 4
The administrator has disabled public write access.
ah its the fact I'm seeing the Eng version perhaps?

As this works -

www.klalemunim.org/de/veranstaltungen.html
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Yes. This page is only in available in German so far.

Can you see the cut containers with the date in the German menu under this page veranstaltungen?
  • MaMuster's Avatar
  • MaMuster
  • LIfetime Developer - Big Bamboo
  • 329 posts
  • 10 Thanks
  • Karma: 4
The administrator has disabled public write access.
Can you now open www.klalemunim.org/de/veranstaltungen.html or do you still get a 404?

Cheers
  • MaMuster's Avatar
  • MaMuster
  • LIfetime Developer - Big Bamboo
  • 329 posts
  • 10 Thanks
  • Karma: 4
The administrator has disabled public write access.
Sorry yes I can open the page but unfortunately I'm not sure what to do with your css to get it to do what you want

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hi

Anthony has pointed out the problem - its this line of your css that is the problem

.equal {overflow:hidden}

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hi Paul,

thanks for looking at it.

Yes, I know. That is what I wrote. The question is how to override the .equal CSS with the class I use for the date Vdat.

.equal is high in the CSS cascade, but it must be somehow possible, just that the usual ways do not work (see CSS post).

I will also scratch my head and see if leaving out the .equal overflow CSS has unintended consequences.

Thanks a lot
  • MaMuster's Avatar
  • MaMuster
  • LIfetime Developer - Big Bamboo
  • 329 posts
  • 10 Thanks
  • Karma: 4
The administrator has disabled public write access.
The overflow is definitely the problem here so it would be a case of working round it

Good luck with it

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers