Jump to content


Snippets and $_Request


  • You cannot reply to this topic
2 replies to this topic

#1 PaulD

    Likes Etomite Forums!

  • Developers
  • PipPip
  • 398 posts
  • Gender:Male

Posted 11 January 2008 - 06:05 PM

I have recently been writing a website as a learning exercise for PHP.

I wrote it not using echo anywhere but writing to output files, as I knew I would later want it inside etomite.

However I wrote it so that it outputs links of the form a href = todo.php?a=5&v=4 etc etc.

But eto already uses the a as an action identifier, but more importantly how should I have passed the variables to allow me to use it within eto.

I could use the code as a stand alone thing and just link to it from eto, but I was hoping to use all the permissions stuff that eto does so well.

Have I missed something really obvious here or have i taken the wrong approach entirley.

Any help and advice much appreciated - thank you.

#2 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 11 January 2008 - 07:18 PM

If you are using FURL's you shouldn't have any problems at all... A more flexible solution would be to use calls to the makeUrl() API function (see documentation) so that it can create your URL's based on each installations Etomite configuration settings... The function is quite flexible and can make life a lot easier...

Examples:
$thisUrl = $etomite->makeURL('','my_alias','?cms=Etomite');
$thisUrl = $etomite->makeURL(45,'','?cms=Etomite&action=lookup');

It handles the whole multiple ? in the argument string automatically too, for when you aren't using FURL's... It'll even generate the proper alias if Friendly Aliases are enabled, even if you send a numeric document id...

#3 PaulD

    Likes Etomite Forums!

  • Developers
  • PipPip
  • 398 posts
  • Gender:Male

Posted 12 January 2008 - 06:33 PM

Thank you Ralph, I shall experiment with this.

Looking at it, it seems to answer the problem I have.

I have been learning PHP and I thought it would be best to learn php 'properly' (ie pure php) and then learn about converting to etomite. Perhaps this was mistaken.

Thank you again.

Paul.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users