inherit
242247
0
Jul 5, 2024 11:38:58 GMT -8
purp1eone
125
February 2017
purp1eone
|
Post by purp1eone on Dec 23, 2019 7:55:49 GMT -8
Site: vikinghorn.proboards.com/Looking to isolate specific pages and having trouble using route names. I can get the following to work for a catch all with custom pages but I can't figure out the syntax for specific custom pages. This will get me to the custom page but what do I need to do if its "....../page/red" ? $[route.name] == 'page' Also having the same issue with the edit thread page. I want to be able to disable some items when the post is being edited. Thanks
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Dec 23, 2019 9:30:31 GMT -8
Site: vikinghorn.proboards.com/Looking to isolate specific pages and having trouble using route names. I can get the following to work for a catch all with custom pages but I can't figure out the syntax for specific custom pages. This will get me to the custom page but what do I need to do if its "....../page/red" ? $[route.name] == 'page' Also having the same issue with the edit thread page. I want to be able to disable some items when the post is being edited. Thanks The page_id would allow you to drill down and identify a specific page: $[route.name]=='page' && $[route.params.page_id]=='red'$[route.name]=='edit_thread' when editing the first post in a thread else it will be $[route.name]=='edit_post' if editing a reply
|
|
inherit
242247
0
Jul 5, 2024 11:38:58 GMT -8
purp1eone
125
February 2017
purp1eone
|
Post by purp1eone on Dec 23, 2019 10:40:52 GMT -8
Thanks Chris Both worked. One more question. Participated Threads has "/" in front of the page name like so: //threads/participated How would I identify that one? Site: vikinghorn.proboards.com/Looking to isolate specific pages and having trouble using route names. I can get the following to work for a catch all with custom pages but I can't figure out the syntax for specific custom pages. This will get me to the custom page but what do I need to do if its "....../page/red" ? $[route.name] == 'page' Also having the same issue with the edit thread page. I want to be able to disable some items when the post is being edited. Thanks The page_id would allow you to drill down and identify a specific page: $[route.name]=='page' && $[route.params.page_id]=='red'$[route.name]=='edit_thread' when editing the first post in a thread else it will be $[route.name]=='edit_post' if editing a reply
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Dec 23, 2019 10:54:21 GMT -8
The route name for participated threads is 'participated_threads'
TIP: You can identify the name for participated thread route or any page for that matter by opening your browser's console (F12 on Chrome) then bringing up the page you are interested in. Once the page loads type pb.data('route').name in the console to see the name that is associated with that page (or just pb.data('route') to see the entire route object including any applicable params)
|
|
inherit
242247
0
Jul 5, 2024 11:38:58 GMT -8
purp1eone
125
February 2017
purp1eone
|
Post by purp1eone on Dec 23, 2019 11:58:18 GMT -8
Thanks for the help Chris That makes it easier The route name for participated threads is 'participated_threads' TIP: You can identify the name for participated thread route or any page for that matter by opening your browser's console (F12 on Chrome) then bringing up the page you are interested in. Once the page loads type pb.data('route').name in the console to see the name that is associated with that page (or just pb.data('route') to see the entire route object including any applicable params)
|
|