-
- 103 Posts
I am getting the error below when I use this Wayfinder call: [!Wayfinder? &startId=`[~[*id*]~]` &hideSubMenus=`true`!]
What I am trying to accomplish is to get the current document’s "id" placed in &startid=
I can have [~[*id*]~] by itself on the page and it works fine but when I insert it into the wayfinder call I get the below error.
So how do I get the current document’s id in the call?
Regards,
Ken Roberts
********** ERROR******************
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’index.html AND sc.published=1 AND sc.deleted=0 AND (sc.privateweb=0) AND sc.hidemenu ’ at line 1 »
SQL: SELECT DISTINCT sc.id,sc.menutitle,sc.pagetitle,sc.introtext,sc.menuindex,sc.published,sc.hidemenu,sc.parent,sc.isfolder,sc.description,sc.alias,sc.longtitle,sc.type,if(sc.type=’reference’,sc.content,’’) as content, sc.template,sc.link_attributes FROM `paysitfo_modx`.modx_site_content sc LEFT JOIN `paysitfo_modx`.modx_document_groups dg on dg.document = sc.id WHERE sc.parent = index.html AND sc.published=1 AND sc.deleted=0 AND (sc.privateweb=0) AND sc.hidemenu = 0 GROUP BY sc.id ORDER BY sc.menuindex ASC;
[Copy SQL to ClipBoard]
Parser timing
MySQL: 0.0026 s (5 Requests)
PHP: 0.0318 s
Total: 0.0344 s
-
- 786 Posts
if you don’t specify any startId it will use the current page automatically
-
- 3,975 Posts
Use:
[!Wayfinder? &startId=`[*id*]` &hideSubMenus=`true`!]
[*id*] will output document’s id, [~[*id*]~] will output document’s processed hyperlink, so you only want numeric ID not the hyperlink.
regards.
zi
-
- 103 Posts
I have also tried using &StartId=`[*id*] already
This is what I have in my page...
<table class="table3"><tr><td class="table4">
Directory Information</td>
</tr>
<tr>
<td>
[!Wayfinder? &startId=`[*id*]` &hideSubMenus=`true`!]
</td></tr></table>
If I hard code ’id’ in the call it works fine but if I use anything else it shows up blank.
Here is what the page source looks like when I use the above call.
<table class="table3"><tr><td class="table4">
Directory Information</td>
</tr>
<tr>
<td>
</td></tr></table>
Regards,
Ken
-
- 786 Posts
does the page you are viewing have any children? And if so are they set to display in menu?