Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: exanimo on June 12, 2014, 13:38:45

Title: target from main content to componenet wrapper
Post by: exanimo on June 12, 2014, 13:38:45
Hello
How can i set the target to point to a specific page inside component wrapper?
Example: I have a link "Submit Web Link"in my front page and i want to target it to open the "add-link.html" page inside wrapper component.
http://www.diadiktio.gr/wrapper/44.html

Than You
Title: Re: target from main content to componenet wrapper
Post by: datahell on June 12, 2014, 13:51:52
You must modify a little component wrapper (insert just 1 line of code). Here is a way to do it.

Main URL: http://www.diadiktio.gr/wrapper/44.html
Wrapped site: http://www.diadiktio.gr/directory/

For any additional path inside the wrapped site add that path into main URL.
Example:
http://www.diadiktio.gr/wrapper/44.html?p=links/state-organizations/
The above should open:
http://www.diadiktio.gr/directory/links/state-organizations/

Now, open file components/com_wrapper/views/default.html.php

Find this:
public function showWrapper($row, $options) {
Add below:
if (isset($_GET['p'])) { $row->link .= trim($_GET['p']); }

That's all!

After that you can add your links like that:
http://www.diadiktio.gr/wrapper/44.html?p=links/state-organizations/
http://www.diadiktio.gr/wrapper/44.html?p=links/home-family/
etc...
Title: Re: target from main content to componenet wrapper
Post by: exanimo on June 12, 2014, 13:54:50
Thank you very much