navigation and URI construction for the path to other pages

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

navigation and URI construction for the path to other pages

mail
I have a question about the path that is generated because currently I can not get links to bring up the intended page. On cfg__nav.inc I have the following:

<?LassoScript
  
   var(
      'nav'=(knop_nav(
         -root='/',
         -default=($s_user->auth ? 'forms' | 'login'),
         -currentclass='ui-btn-active')),
      'nav_children'=null
      );
  
   $nav_children=(knop_nav);
   $nav_children->(insert(-key='forms',-label='Forms Home'));
   $nav_children->(insert(-key='forms_physicianInteraction',-label='Physician Interaction'));
   $nav_children->(insert(-key='forms_competencies',-label='Competencies'));

   $nav->(insert(
      -key='forms',
      -label='forms',
      -children=$nav_children,
      -default='forms'));
  
   $nav_children=(knop_nav);
   $nav_children->(insert(-key='timeclock',-label='Time Clock Home'));
   $nav_children->(insert(-key='timeclock_in',-label='Time Clock In'));
   $nav_children->(insert(-key='timeclock_out',-label='Time Clock Out'));

   $nav->(insert(
      -key='timeclock',
      -label='Time Clock',
      -children=$nav_children,
      -default='timeclock'));
  
    ...
?>

It creates a navigation as follows (when Time Clock is selected):

# forms
# Time Clock

    * Time Clock Home
    * Time Clock In
    * Time Clock Out
    ...

The HTML behind this navigation is as follows:

<ul>
   <li><a href="/forms/">forms</a></li>
   <li><a href="/timeclock/" class="ui-btn-active">Time Clock</a>
      <ul>
         <li><a href="/timeclock/timeclock/">Time Clock Home</a></li>
         <li><a href="/timeclock/timeclock_in/">Time Clock In</a></li>
         <li><a href="/timeclock/timeclock_out/" class="ui-btn-active">Time Clock Out</a></li>
      </ul>
   </li>
    ...
</ul>

The file system is structured as follows:

/_content
   cnt_forms_competencies.inc
   cnt_forms_physicianInteraction.inc
   cnt_forms.inc
   cnt_login.inc
   cnt_timeclock_in.inc
   cnt_timeclock_out.inc
   cnt_timeclock.inc

My question then is, are all _content files to be located at /_content? No sub-directories? Do the names of the _content files have to be specifically assigned (meaning the names have something to do with how the file is retrieved by the knop framework)? When I click on my links, they do not find the content files, but instead display a blank page.

A URL that is shown as "/timeclock/timeclock_in/" I understand from the documentation that it is not a physical path, but it means the action is "timeclock" and the actionpath, what is to be done, is "timeclock_in". But, is that what I really want? Do I need the action to be "timeclock_in"? ... meaning load the content for the "timeclock_in" page. Also, am I supposed to put children nav items into subdirectories? (I tried and it did not work either).

Is there more documentation specifically on how URIs are to be structured in Knop? What does Knop do if the incoming URI has a domain and more then 2 path components (action and actionpath), are the 3rd, 4th, and so on components of the URI treated as parameters to whatever method is called, or are they ignored?

Michael

-- 

#############################################################

This message is sent to you because you are subscribed to

the mailing list <[hidden email]>.

To unsubscribe, E-mail to: <[hidden email]>

Send administrative queries to  <[hidden email]>

List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html

Project homepage http://montania.se/projects/knop/

Google Code has the latest downloads at http://code.google.com/p/knop/


	
	
	
	
Reply | Threaded
Open this post in threaded view
|

Re: navigation and URI construction for the path to other pages

stevepiercy
Just a quick response since I'm pressed for time.  Hopefully
someone else can fill in the details.

Check the Knop paper for explanation of all the directories that
Knop searches for files.

http://code.google.com/p/knop/downloads/detail?name=Knop%20Paper.pdf

--steve


On 3/7/11 at 6:43 AM, [hidden email] pronounced:

>[ This message was sent as HTML. The text you see here was    ]
>[ generated by Mailsmith; the original HTML is available as   ]
>[ an enclosure.                                               ]
>
>I have a question about the path that is generated because
>currently I can not get links to bring up the intended page. On
>cfg__nav.inc <http://cfg__nav.inc> I have the following:
>
><?LassoScript
>  
>  var(
>     'nav'=(knop_nav(
>        -root='/',
>        -default=($s_user->auth ? 'forms' | 'login'),
>        -currentclass='ui-btn-active')),
>     'nav_children'=null
>     );
>  
>  $nav_children=(knop_nav);
>  $nav_children->(insert(-key='forms',-label='Forms Home'));
>  $nav_children->(insert(-key='forms_physicianInteraction',-label='Physician
>Interaction'));
>  $nav_children->(insert(-key='forms_competencies',-label='Competencies'));
>
>  $nav->(insert(      -key='forms',      -label='forms',
>     -children=$nav_children,
>     -default='forms'));
>  
>  $nav_children=(knop_nav);
>  $nav_children->(insert(-key='timeclock',-label='Time Clock Home'));
>  $nav_children->(insert(-key='timeclock_in',-label='Time Clock In'));
>  $nav_children->(insert(-key='timeclock_out',-label='Time Clock Out'));
>
>  $nav->(insert(      -key='timeclock',
>     -label='Time Clock',
>     -children=$nav_children,
>     -default='timeclock'));
>  
>   ...
>?>
>
>It creates a navigation as follows (when Time Clock is selected):
>
># forms
># Time Clock
>
>   * Time Clock Home
>   * Time Clock In
>   * Time Clock Out
>   ...
>
>The HTML behind this navigation is as follows:
>
><ul>
>  <li><a href="/forms/">forms</a></li>
>  <li><a href="/timeclock/" class="ui-btn-active">Time Clock</a>
>     <ul>
>        <li><a href="/timeclock/timeclock/">Time Clock Home</a></li>
>        <li><a href="/timeclock/timeclock_in/">Time Clock In</a></li>
>        <li><a href="/timeclock/timeclock_out/"
>class="ui-btn-active">Time Clock Out</a></li>
>     </ul>
>  </li>
>   ...
></ul>
>
>The file system is structured as follows:
>
>/_content
>  cnt_forms_competencies.inc <http://cnt_forms_competencies.inc>
>  cnt_forms_physicianInteraction.inc <http://cnt_forms_physicianInteraction.inc>
>  cnt_forms.inc <http://cnt_forms.inc>
>  cnt_login.inc <http://cnt_login.inc>
>  cnt_timeclock_in.inc <http://cnt_timeclock_in.inc>
>  cnt_timeclock_out.inc <http://cnt_timeclock_out.inc>
>  cnt_timeclock.inc <http://cnt_timeclock.inc>
>
>My question then is, are all _content files to be located at
>/_content? No sub-directories? Do the names of the _content
>files have to be specifically assigned (meaning the names have
>something to do with how the file is retrieved by the knop
>framework)? When I click on my links, they do not find the
>content files, but instead display a blank page.
>
>A URL that is shown as "/timeclock/timeclock_in/" I understand
>from the documentation that it is not a physical path, but it
>means the action is "timeclock" and the actionpath, what is to
>be done, is "timeclock_in". But, is that what I really want? Do
>I need the action to be "timeclock_in"? ... meaning load the
>content for the "timeclock_in" page. Also, am I supposed to put
>children nav items into subdirectories? (I tried and it did not
>work either).
>
>Is there more documentation specifically on how URIs are to be
>structured in Knop? What does Knop do if the incoming URI has a
>domain and more then 2 path components (action and actionpath),
>are the 3rd, 4th, and so on components of the URI treated as
>parameters to whatever method is called, or are they ignored?
>Michael
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: navigation and URI construction for the path to other pages

Johan Solve-2
In reply to this post by mail
At 06.43 -0700 2011-03-07, <[hidden email]> wrote:

>The file system is structured as follows:
>
>/_content
>   <http://cnt_forms_competencies.inc>cnt_forms_competencies.inc
>   <http://cnt_forms_physicianInteraction.inc>cnt_forms_physicianInteraction.inc
>   <http://cnt_forms.inc>cnt_forms.inc
>   <http://cnt_login.inc>cnt_login.inc
>   <http://cnt_timeclock_in.inc>cnt_timeclock_in.inc
>   <http://cnt_timeclock_out.inc>cnt_timeclock_out.inc
>   <http://cnt_timeclock.inc>cnt_timeclock.inc
>
>My question then is, are all _content files to be located at /_content? No sub-directories? Do the names of the _content files have to be specifically assigned (meaning the names have something to do with how the file is retrieved by the knop framework)? When I click on my links, they do not find the content files, but instead display a blank page.

Knop expects your content files for the sub nav item to be named like this:
cnt_timeclock_timeclock.inc
and so on

There are other ways to organize Knop files and folders, see here for a full coverage
http://lasso.2283332.n4.nabble.com/File-organization-and-naming-td3158587.html



>A URL that is shown as "/timeclock/timeclock_in/" I understand from the documentation that it is not a physical path, but it means the action is "timeclock" and the actionpath, what is to be done, is "timeclock_in". But, is that what I really want? Do I need the action to be "timeclock_in"? ... meaning load the content for the "timeclock_in" page.

No, the actionpath is not part of the url bu to specified separately as the -action parameter.
The path is timeclock/timeclock_in.

>Also, am I supposed to put children nav items into subdirectories? (I tried and it did not work either).

See above about file organization.

>Is there more documentation specifically on how URIs are to be structured in Knop? What does Knop do if the incoming URI has a domain and more then 2 path components (action and actionpath), are the 3rd, 4th, and so on components of the URI treated as parameters to whatever method is called, or are they ignored?

Again, action and actionpath are not path components.

The Knop path can be one or more path components depending on how deep your nav structure.
The remainder of the path is accessed by nav -> getargs and it is up to you to use that for keyvalue or other things.

--
     Johan Sölve    [FSA Member, Lasso Partner]
     Web Application/Lasso/FileMaker Developer
     MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se   mailto:[hidden email]
 (spam-safe email address, replace '-' with 'a')

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/