- Posts: 12
COMMUNITY FORUM
Open item in lightbox
- Nexus Star
- Topic Author
- Offline
- New Member
Less
More
14 years 7 months ago #79026
by Nexus Star
Open item in lightbox was created by Nexus Star
I would like to make some of my item to be opened in lightbox.I made separate template override for one of my categories in K2 and made only images with pagination to be shown. I would like to be able when someone click on one of those images in lightbox to be shown only the item.Now I manage to make the whole page with the article to be opened in lightboxwhen adding: rel="{handler:'iframe',size:{x:300,y:300}}" just before href in image linkBut the problem with this is that it opens the whole web page navigated to this particular item.I am aware that I need to change the value of href in this link but how?If someone could help with this please?
Please Log in or Create an account to join the conversation.
- Gobezu Sewu
- Offline
- Senior Member
14 years 7 months ago #79027
by Gobezu Sewu
Replied by Gobezu Sewu on topic Open item in lightbox
in addition to what you have done
1. if you don't already have it, drop the attached raw template in your template folder
2. in components\com_k2\models\item.php at row # 63 append '&tmpl=component' to the $link variable
that should do it
1. if you don't already have it, drop the attached raw template in your template folder
2. in components\com_k2\models\item.php at row # 63 append '&tmpl=component' to the $link variable
that should do it
Please Log in or Create an account to join the conversation.
- Simon Wells
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 7 months ago #79028
by Simon Wells
Replied by Simon Wells on topic Open item in lightbox
Hi Gobezu,
You have asked for a file to be downloaded and a line of code to be changed, but you have not explained what the file is or why you need to do this.
For those that do not know, they could well be put off as they wont know what this is for.
Please could you explain.
Thanks.
Gobezu Sewu said:in addition to what you have done
1. if you don't already have it, drop the attached raw template in your template folder
2. in components\com_k2\models\item.php at row # 63 append '&tmpl=component' to the $link variable
that should do it
You have asked for a file to be downloaded and a line of code to be changed, but you have not explained what the file is or why you need to do this.
For those that do not know, they could well be put off as they wont know what this is for.
Please could you explain.
Thanks.
Gobezu Sewu said:in addition to what you have done
1. if you don't already have it, drop the attached raw template in your template folder
2. in components\com_k2\models\item.php at row # 63 append '&tmpl=component' to the $link variable
that should do it
Please Log in or Create an account to join the conversation.
- Nexus Star
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
14 years 7 months ago #79029
by Nexus Star
Replied by Nexus Star on topic Open item in lightbox
Thank you so much
this do just what I am searching about for the past couple of days
this do just what I am searching about for the past couple of days
Please Log in or Create an account to join the conversation.
- Simon Wells
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 7 months ago #79030
by Simon Wells
Replied by Simon Wells on topic Open item in lightbox
Can you explain to other users, what the download is please?
Nexus Star said:Thank you so much this do just what I am searching about for the past couple of days
Nexus Star said:Thank you so much this do just what I am searching about for the past couple of days
Please Log in or Create an account to join the conversation.
- Gobezu Sewu
- Offline
- Senior Member
14 years 7 months ago #79031
by Gobezu Sewu
Replied by Gobezu Sewu on topic Open item in lightbox
@K2Joom, I am sorry for being so cryptic and thank you for letting me know, partly it is b/c this damn forum that doesn't allow for any such kind of communication, as I actually never intended to attach a file rather include the code and do some explaining but was not able to submit my message...
Anyway the attached file is a so called raw template which simply leaves out all module and other calls and only includes component part as follows which if anyone who have opened a joomla template file would recognize is the call to the components content. That simple code along with the common don't call me if its not joomla internal line is saved as raw.php in the template folder which would facilitate the &tmpl=component override
More of this is discussed over here and here
lets see if i am able to submit this one now
K2Joom said:Can you explain to other users, what the download is please?
Nexus Star said:Thank you so much this do just what I am searching about for the past couple of days
Anyway the attached file is a so called raw template which simply leaves out all module and other calls and only includes component part as follows which if anyone who have opened a joomla template file would recognize is the call to the components content. That simple code along with the common don't call me if its not joomla internal line is saved as raw.php in the template folder which would facilitate the &tmpl=component override
More of this is discussed over here and here
lets see if i am able to submit this one now
K2Joom said:Can you explain to other users, what the download is please?
Nexus Star said:Thank you so much this do just what I am searching about for the past couple of days
Please Log in or Create an account to join the conversation.
- Gobezu Sewu
- Offline
- Senior Member
14 years 7 months ago #79032
by Gobezu Sewu
Replied by Gobezu Sewu on topic Open item in lightbox
Simply frustrating, I am sorry but it seems to have discarded the code part so if you want to know those 2 lines you simply have to resort to downloading the file and have a look
Good luck
Good luck
Please Log in or Create an account to join the conversation.
- Simon Wells
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 7 months ago #79033
by Simon Wells
Replied by Simon Wells on topic Open item in lightbox
Thanks ;)
Gobezu Sewu said:Simply frustrating, I am sorry but it seems to have discarded the code part so if you want to know those 2 lines you simply have to resort to downloading the file and have a look
Good luck
Gobezu Sewu said:Simply frustrating, I am sorry but it seems to have discarded the code part so if you want to know those 2 lines you simply have to resort to downloading the file and have a look
Good luck
Please Log in or Create an account to join the conversation.
- Nexus Star
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
14 years 7 months ago #79034
by Nexus Star
Replied by Nexus Star on topic Open item in lightbox
I think that on my part could also explain what I achieved by this.
On the first try I saved the raw.php file in my custom template and append &tmpl=component
to link component in item.php file by adding the line $llink.='&tmpl=component'; just bellow 63 line.
But this lead all my read-more links to raw template resulting in displaying items striped by all other content.
So I made something else I made another template just for the category I want to look different and in there append
'&tmpl=component' just to the href link for images.
After changing configuration of joomla to SEF links I change the append to ?tmpl=component
You can see in attached images what I achieved by this - when someone clicks on image opens lightbox with item in it.
Please excuse the view of images but the site is still in development and again many thanks to Gobezu Sewu
On the first try I saved the raw.php file in my custom template and append &tmpl=component
to link component in item.php file by adding the line $llink.='&tmpl=component'; just bellow 63 line.
But this lead all my read-more links to raw template resulting in displaying items striped by all other content.
So I made something else I made another template just for the category I want to look different and in there append
'&tmpl=component' just to the href link for images.
After changing configuration of joomla to SEF links I change the append to ?tmpl=component
You can see in attached images what I achieved by this - when someone clicks on image opens lightbox with item in it.
Please excuse the view of images but the site is still in development and again many thanks to Gobezu Sewu
Please Log in or Create an account to join the conversation.
- Gastro Charlie
- Offline
- New Member
Less
More
- Posts: 1
14 years 7 months ago #79035
by Gastro Charlie
Replied by Gastro Charlie on topic Open item in lightbox
Hello Nexus ..
I've been trying and trying this hack for hours now but saddy can't get it to work. : |
Maybe you can help me?
I've followed these steps :
1. added rel="{handler:'iframe',size:{x:300,y:300}}" before href (in the components\com_k2\models\item.php file) is that the wrong file?
2. uploaded raw.php in my joomla template directory
3. added the line $llink.='&tmpl=component' just below line 63 in models\item.php
I suppose it's not working because of step 1. Could you confirm this .. or hlp me to get it working..
Thanks
Marco
I've been trying and trying this hack for hours now but saddy can't get it to work. : |
Maybe you can help me?
I've followed these steps :
1. added rel="{handler:'iframe',size:{x:300,y:300}}" before href (in the components\com_k2\models\item.php file) is that the wrong file?
2. uploaded raw.php in my joomla template directory
3. added the line $llink.='&tmpl=component' just below line 63 in models\item.php
I suppose it's not working because of step 1. Could you confirm this .. or hlp me to get it working..
Thanks
Marco
Please Log in or Create an account to join the conversation.