Search the Community
Showing results for tags 'page ID'.
-
Hi I have a list of pages all based on the same template but I want to exclude 2 by page ID $expertises = $pages->find("template=case-type, sort=sort"); foreach ($expertises as $expertise); I know I could change their template or add an exclude checkbox to the template etc Wondering if there is a page=not(4989,9877) type of thing in the API to exclude pages by ID? I can't find anything in the API docs but think I may be searching for the wrong phrase. Thanks
-
Hi all, I need help creating link in CK editor that would target my translated page, so it depends on what language user has selected. something like: <a href="?id=1450">view all</a> would target: <a href="en/onion/">Onion</a> <a href="de/zwiebel"></a> depending on user defined language. Thank you
- 4 replies
-
- multilingual
- pageurl
-
(and 1 more)
Tagged with:
-
I love nice urls - but I also recognize that they are not always needed nor desired due to the additional steps in page creation. Suggested solution: Page ID Page ID is a per-template auto-incrementing number. No. series might be added on a per-template basis (to be configured by webmaster). Page url Replace the full page url with an ID (as an optional configuration). Page url might then change to something like: www.example.com/page/1234 Editing (Page Tree is much less important in this scenario.) Like Drupal's Node IDs (nid). Why this change? Name may reveal confidential info. Name may not matter on certain templates. Page creation is no longer a two-step process; much like adding a row in MySQL. Benefit: This change will make it easier to use ProcessWire for other purposes than websites ("Oh - so ProcessWire is also a finance system!").
-
I'd like to link to a page by referencing it's page ID <a href="?id=1411">view all</a> instead of using a page path <a href="/solutions/case-studies/">view all</a> Using a page name/path result in breaking changes whereas using an ID is more future proof, right? The only Module I found is called PageLinkAbstractor which works for text fields and RTEs but not necessarily templates. I normally do this on MODX using something like... <a href="index.php?id=1411">view all</a>
-
Hi all, I'm working on a function that outputs markup for a bootstrap 3 carousel. I'm passing the $page->images object to the function argument $images. To have an individual id for each carousel on a page with multiple carousels, I want to use the image field id and the page id of the page were the image field sits. I can get the image field id with: $images->field->id But I can't seem to get the page id although it's there in the var_dump of the $images object: object(Pageimages)[203] protected 'page' => object(Page)[206] protected 'template' => ... protected 'settings' => array (size=10) 'id' => int 1013 //this is the id I need ... protected 'field' => object(Field)[72] protected 'settings' => array (size=5) 'id' => int 100 //this one I can get with $images->field->id ... When I try $images->page->settings->id I get null. When I try $images->page->id I get 1012 instead of 1013. 1012 is nowhere to be found in the $images object. It is the id of the page from which I'm calling my function. But I'm not passing the $page object to my function. So where does it come from and how can I get the correct page id? Thanks for reading through this!