Fiji Web Design
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Link new page and show mainbody joomla (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Link new page and show mainbody joomla
#192
sp_web (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Link new page and show mainbody joomla 3 Years, 4 Months ago Karma: 0  
Hello!

I hope you can understand me. Sorry but I don't speak English.

I inserted a PHP page with 'PHP Pages Component'. It works very well. But I'd like it when you press a link on that page I open otherwise, on Joomla mainbody.

I want to open a new page en Joomla mainbody.

I try:
header("location: ./components/com_php/files/listar.php");
and:
<a href="./components/com_php/files/listar.php?title=<?=$title;?>">Detalles </a>
but it opens the new page outside joomla. (I need send parametres) Can you help me? Thank you very much.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#193
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:Link new page and show mainbody joomla 3 Years, 4 Months ago Karma: 10  
Please see this great hack provided by Linus:
http://www.fijiwebdesign.com/component/option,com_fireboard/Itemid,54/func,view/id,190/catid,10/

It allows you to specify a custom filename through the parameters. This filename is base64 encoded. The file specified will be included into the mainbody.

You can also create a new "PHP Page" using the PHP component. Then create a menu link for this page, but do not publish it. This is just so you get a link to this PHP page.
Then to link to it, use its "Itemid" created by the menu Manager.

eg: index.php?option=com_php&Itemid=5

If the Itemid created was 5.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#194
sp_web (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:Link new page and show mainbody joomla 3 Years, 4 Months ago Karma: 0  
Thank you very much for answering my question 'admin'.

The linus's code I don't understand it either, so watch carefully.

Respect to:
admin wrote:
QUOTE:

You can also create a new "PHP Page" using the PHP component. Then create a menu link for this page, but do not publish it. This is just so you get a link to this PHP page.
Then to link to it, use its "Itemid" created by the menu Manager.


I try to do this, but it doesn't work. I got:

header("location: index.php?option=com_php&Itemid=67";

67 is the Itemid of the new PHP page in menu (not publish).

But when I click the link, I sample:

"Please choose a File" --> because in the php.php (of com_php) don´t exit '$filename'.

Please, Can you help me?

Sorry for my level of English
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#195
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:Link new page and show mainbody joomla 3 Years, 4 Months ago Karma: 10  
Just link to the page:

<a href="index.php?option=com_php&Itemid=67">Example Page</a>
The Itemid=67 must link to a valid page. Make sure you created the file in the PHP Pages component.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#196
sp_web (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:Link new page and show mainbody joomla 3 Years, 4 Months ago Karma: 0  
Thanks again

I think I do well but it doesn't work.

1º.- I inserted the page in 'php component'
2º.- I created a link on the main menu (Itemid 67)
3º.- This page isn't publish. ( the user don't see the link)
4º.- I insert other php page, and I write the link in this page:
<a href="index.php?option=com_php&Itemid=67">Example Page</a>
This page is publish.

When user reaches to joomla and click on the link displays the message:
'Please choose a file'

But if the first page is publish, when user click on the link displays the information.

Is it possible to access unpublished pages?

and other questions

Is it possible to pass parameters between pages?

Thank you
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#197
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:Link new page and show mainbody joomla 3 Years, 4 Months ago Karma: 10  
Try placing the new Menu Item in a different menu. Publish the Menu Item, but do not publish the menu module.

I think that should work.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Joomla Downloads

DownloadsDownload our free Joomla! Components, Modules and Plugins.