- Posts: 2
COMMUNITY FORUM
Show Attachements in Module
- msk
- Topic Author
- Offline
- New Member
Less
More
8 years 1 month ago #157047
by msk
Show Attachements in Module was created by msk
Hi,
i want to show the attachements of the "active" article in a module in the Sidebar.
The module is only active on sites where the main article is shown in the main content area.
Is there a way to access the attachements of an active k2 arctile (like $this in the article itself) from the module without a seperate sql query?
I know there is a way to create a K2 Tools modules for each article with a single article selected, but thats way more work. This should work for thousands or articles.
Thanks and greetings
msk
i want to show the attachements of the "active" article in a module in the Sidebar.
The module is only active on sites where the main article is shown in the main content area.
Is there a way to access the attachements of an active k2 arctile (like $this in the article itself) from the module without a seperate sql query?
I know there is a way to create a K2 Tools modules for each article with a single article selected, but thats way more work. This should work for thousands or articles.
Thanks and greetings
msk
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 1 month ago #157054
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Show Attachements in Module
Hello,
If you do not want to perform a separate query, you can use an override of the item.php file and use its contents in a separate block. You can then load an extra module position above or bellow it in order to load all the other modules.
If you do not want to perform a separate query, you can use an override of the item.php file and use its contents in a separate block. You can then load an extra module position above or bellow it in order to load all the other modules.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- msk
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
8 years 1 month ago #157061
by msk
Replied by msk on topic Show Attachements in Module
Thanks for your reply!
But in this case a module gets loaded in the content area, right?
Best would be if theres a way to get the data in a seperate module which can be loaded/placed everywhere on the site.
But in this case a module gets loaded in the content area, right?
Best would be if theres a way to get the data in a seperate module which can be loaded/placed everywhere on the site.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 1 month ago #157072
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Show Attachements in Module
Depending on the template, you can render all the surrounding modules in the item.php file.
Another approach would be to use JS to clone data or you could render the JSON feed generated by that item.
Cleaner solution and no additional queries.
Another approach would be to use JS to clone data or you could render the JSON feed generated by that item.
Cleaner solution and no additional queries.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.