Jump to content

Search the Community

Showing results for tags 'url'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Ill try to explain this as best I can. I am making a site map and using the following: foreach($page->sitemap as $site) { $out = "\n<url>"; $out .= "\n\t<loc>" . $site->httpUrl . "</loc>"; $out .= "\n\t<lastmod>" . date("Y-m-d", $page->modified) . "</lastmod>"; $out .= "\n</url>"; echo $out; } This works perfectly and the url displays as http://sitename.com/data/datasetone/page-one . I was wondering for the sake of this question, is there a way to only pull from /page-one in the url? I know $site->url would give me data/datasetone/page-one, but I really need just the page name
  2. Hi, I'm quite sure to have read everything, doc and forums, about urlSegment, but I'm still not understanding how to use it. After have set my categories with this excellent post, I'm unable to fix url as I want. Page title | Template | actual url | url I want Categ-publi | parent_categ | categ-publi/article | publication/article -- Article | categories | Publication | basic-template | publication/example1 | publication/article/example1 -- example1 | publication | For which template I should activated urlSegment and in which template file I should add some code, probably something like this (which didn't work obviously)? if($input->urlSegment1 == 'publication') { echo $pages->get('/publication/$categ/')->render(); return; } else if($input->urlSegment1) { // throw a 404 throw new Wire404Exception(); } Thanks so much. Melanie
  3. Preamble: Processwire is awesome and the freedom of development is quite insane. Issue: When using CKEditor and entering a URL, it says: "Enter a URL, email address, anchor, or enter word(s) to find a page." I have installed the multilingual module, so I need to target: /en/contact/ and /de/contact/ and /lt/contact/ Adding a link to the text, I can only add one of those 3 contact links. When copying the text (including links) into another body (another language), then I need to edit each link to set the correct language - every time. Idea for solution: Is it possible to allow entering either: 1. The page id (then the module could read this and create a URL), or: 2. A placeholder for the language, e.g. "*contact" (then the module could replace the asterisk with the language identifier) Thanks in advance for your ideas.
  4. Hi all, I'm experimenting building a content site based on AngularJS and Processwire. I‘ve turned on the html5Mode in angularjs, everything works so far re agularjs routing, but when I try to refresh a page, only loads a page without header (thus no js/style). This to me seems a classic problem with server setup ( http://stackoverflow.com/questions/16569841/reloading-the-page-gives-wrong-get-request-with-angularjs-html5-mode/16570533#16570533 ), which requires htaccess setup (I'm on Apache server). But not quite sure how to set up the htaccess? Attached is my htaccess, with below are some routing settings of angular: scotchApp.config(function($routeProvider,$locationProvider) { $routeProvider .when('/news', { templateUrl : 'news', controller : 'mainController' }) .when('/about', { templateUrl : 'about', controller : 'aboutController' }) .otherwise({ templateUrl : 'news', controller : 'mainController' }); $locationProvider.html5Mode(true); }); THANKS advance for all your help! htaccess.txt
  5. We have a members area (accessed via a login) which lists a load of horses. Much of the information here is members-only and has been stored as pages in the backend of the website (via a feed). We now wish to consume this information on the frontend (public) area of the site. In my template I can easily grab the horses and loop through them but on the frontend $horse->url returns the members area url so: members/horses/horsename Rather than /public/horses/horsename Is there a sensible way to solve this or am I going to have to resort to creating a custom URL format. grabbing a reference and passing it to the next page? Many thanks Pete
  6. I seem to be having trouble with url segments on a projects. I'm working on an arrest report system and will provide the structure. What I have is a page called arrests in the back end that loads up an arrests.php file. Under arrests, in the back-end (with URL segments enabled), I have two pages that only store data, they don't load actual .php files. structure in the back-end (see attached photo) /arrests (loads arrests.php) -February 2016 - a page that uses a template called arrestlog that only stores data, it has no .php file -March 2016 - a page that uses a template called arrestlog that only stores data, it has no .php file when my site loads /arrests/ my arrests.php performs a find('template=arrestlog') where I display only the most recent addition, in this case data for March 2016. So, if you go to /arrests/ in a browser, arrests.php does a $pages->find() and displays only March 2016 data. What I'm trying to do is create a "next" link that loads : /arrests/february-2016/ So, when arrests is passed a url segment1 I can pull that url segment, then run a find on it to display february data. I could use /arrests/?id= method to callback arrests.php passing a parameter, but, I'd rather use a friendly url segment if possible. The end result is I'm getting a 404. Assistance is much appreciated.
  7. The current use of relative urls (in my opinion) is great. However, I have a project that requires image paths to be absolute (using the source code module so the code can be dropped in different pages outside of processwire), ie: http://example.com/files/1024/fileName.jpg . Is this possible to do in processwire? I had searched around but couldn't find anything regarding the topic. Sorry, I forgot to post this. I am currently calling images like so: <?php echo $page->headerImg->url; ?> which produces: <img src="/testing/site/assets/files/1035/header.jpg" >
  8. One of my blogs seems to be accessible from multiple URLs and it's affecting my clients SEO. For example, using the following URL structures, I can access the same page. http://www.domain.not/blog/page2/ http://www.domain.not/blog/posts/page2/ The correct one is probably the second one as all posts are children of blog. My actual blog structure is as follows Blog - Posts -- Post A -- Post B -- Post C (etc) - Tags - Categories I have pagination enabled on a template called blog-posts which is applied to the Posts page. I'm not sure though why the double URL is occouring?
  9. I have an external database with a list of items, each one identified by an id. I would like to integrate this database into the CMS. www.example.com/external-database/item/<id> I have created a page www.example.com/external-database/item, but not the dependent pages. If link to the ids, Processwire tells me that they don't exist. Can I use the id urls without creating the pages? The id urls should use the parent url as template and use <id> as a parameter. In short, a parameterized template.
  10. Hi, I created a table and have a column using the URL field type; how do I add a ahref tag via the API so that on the output, the URL is clickable? Below is the section of code and any suggestions would be great as I'm a newbie! foreach($page->tbl_CompanyURLs as $c_url) { if($c_url->url_company) echo "$c_url->url_company<br />"; if($c_url->url_updated) echo "$c_url->url_updated <br />"; } Cheers, Tiffany
  11. I thought I had this, but I guess my understanding of get/find for pages is a bit lacking (or perhaps nonexistent). I am trying to switch the stylesheet based on the URL using a simple if/else statement, but what I wrote doesn't seem to be doing the job. I currently just have two pages (that each need two different background images), but they share the same head.inc file. I wrote: <?php // Switch stylsheets based on site $styleSwitcher = $pages->get('/url-one/'); if($styleSwitcher){ echo "<link rel='stylesheet' href='{$config->urls->templates}css/one.css' />"; } else{ echo "<link rel='stylesheet' href='{$config->urls->templates}css/two.css' />"; } ?> I assume I messed up my "get" as both pages are still loading one.css
  12. I 've got 2 languages let's say default and german and I am using multilingual fields: Is there a way to disable fallback to default language url if german is not active for a page ? Is there a way to have active only the german language for some pages ? example.com/mypage redirects to example.com/default/mypage, can I disable that ?
  13. I appreciate all the help thus far in learning how to navigate Processwire. However, I have hit a road block. I have an Image Field in one of my templates (it is being used in a repeater), and I would like to assign a preexisting page's url to the image . Ie: <a href="url-to-page"><img src="code-for-image" /></a> However, maybe I have missed something, as I set up the field (homepageImg) to be a "page select" but nothing is currently populating the dropdown. I am merely trying to get all the children of the parent (that the current page is in) and display them. I thought this would make it easy for someone to set the URL on the fly. Any help would be appreciated.
  14. Hello, Running into a probleme. Any help would be appreciated. I have a url fieldtype. When I insert urls with a '%' symbol in it I get a :itemUrl: Error found - please check that it is a valid URL The url is a valid url. Once saved all the % are stripped out from the url and replaced by a spaces. This is running on PW dev version 2.6.21 and php 5.4.42 (I was on a earlier version of php, I then up dated it to 5.4.42 to see but didnt change anything) The funny thing is that I have an other test site running on PW 2.6.1 where this problem doesn't occur. Any Idea Thanks
  15. Hi, I am new to PW and first of all: Thanks to all the great hard work on it!! I created my first site, but I am having problems to find the correct way to arrange the URL. My concret problem: PW is running on server A in e.g. "/project/cms/site". Domain is on server B, e.g. "my-domain.com". On server B a .htaccess-file has already a reWrite-rule to point the user to server A to path "/project/cms". That is giving now the user this URL in the browser: "www.my-domain.com/site/product/item-a". Problem: I do not want to have the "site" - path in between :-( Instead I want this: "www.my-domain.com/product/item-a". But where I need to do that? Did I already made a mistake in setting up my project? Do I need to hook a module? I want a valid solution, no hack, so it works proper in all other modules (for links in the HTML Editor, for the images / assets, etc.). I am very glad for any help
  16. I'm trying to modify the property 'path' for a specific Page (User, actually) using the following code: $this->addHookAfter("Page::path",$this,"modifyUserPagePath"); AND public function modifyUserPagePath(HookEvent $event){ $p = $event->object; if($p->template == "user" && $p->hasRole("ambassador")){ die("MODIFY THE PATH HERE WITH PREFIX FOR THE CURRENT VIEWING PAGE"); } } But i'm not able to retrieve the page that is currently running (as in, the page in the browser url). Please note I'm also using the render() method to render subpages content. I don't need the subpages url but only the original $page requested. Is there a pretty way to do this (besides looking it up via $_SERVER['REQUEST_URI'] )?
  17. Hello everyone, in the first line I need to say, that I am NO developer or programmer. I am just a german language translator and interpreter who is seeking for help. The freelancer who created a website ( I have tried to change the code in this line: <a href="'.$page->siteurl.'">. I managed to get the link work but just for one language. If I changed the language version the link showed me always the same version. Can someone tell me if someone like me without any knowledge in this matter can handle it to get this thing done? fix a problem with 'SEO boxes' visible here http://berlineo.com/pl/oferta/tlumaczenia-pisemne/''>http://berlineo.com/pl/oferta/tlumaczenia-pisemne/'>http://berlineo.com/pl/oferta/tlumaczenia-pisemne/ at the bottom (looks like radio button); the code was copied from the home page, where these SEO buttons are OK; I need this section to be usable wherever I wish to paste it; Can sombody tell me the reason for this and help me fix it? Thank you in advance!
  18. How can I set "$config->pageNumUrlPrefix" as empty? So pages are for example "blog/2/" instead of blog/page2/". Thanks!
  19. hi, i have a question, which i should be able to work out with htaccess, i just wanted to ask, if there's an easier way using processwire: i set up a new site using processwire with multilang etc. since a lot of stuff changed on the website (contents, hierachy, ...) there's now also a different domain structure. the old structure was: www.example.com/outlet-1 and now it's www.example.com/en/find-us/outlet-1 is there any way i can do a (temporary) 301 redirect, without having to remodel to the whole structure? the main reason for this is, that there are still tons of flyers and other advertising materials with this domain structure (transitionphase should end in <6months) the whole thing comes down to about 4-5 pages -- so nothing really drastic. also if there's no way in doing this with processwire, help with a proper RewriteRule for htaccess would be greatly appreciated. current workaround doesnt really do the trick. thanks so far!
  20. I've been trying to find the reason why when I print a page on my ProcessWire website, that the page appears to have URLs that appear next to links in the entire page. For example, here is a link on the website I built: http://thechapel.com/sermons/easter-2015/easter/ When you print the page in Chrome for example, every link on the page has a relative URL next to it with parenthesis. See attached image. I'm running ProcessWire 2.5.3. Is this something that was added recently to ProcessWire, and is there a way to turn the URLs that appear off? I also found it on another ProcessWire website - http://www.craftedbyspark.com/ - so I know its not just me.
  21. I was looking over my Analytics data for my site the other day, and I noticed some of the pages people are landing on have a strange relative url that's not part of my url scheme. Site: http://thesharktankproducts.com Example url: thesharktankproducts.com/categories/food Weird url showing up in Google analytics: thesharktankproducts.com/index.php?it=categories/food Both urls are showing up in Analytics, so it's not a question of the correct one not showing up. I have deduced that almost all the traffic to these weird urls is coming from Yahoo and Bing, so it may be something I need to fix with them. But, still, it's weird that this url A) works and B) somehow got into the search page results at Yahoo and Bing. Has anyone seen this before? Should I set Redirects for the pages this is happening on? Is there another way inside PW to fix this? Thanks!
  22. Hi there, Is there a native way to adjust how a page's name/url/slug is generated as you type? I'd like it to function similarly to WordPress, which filters out stop words like, "a", "to", "the", etc. If there's not a way to do it natively, would you recommend a module that hooks into the event of when a new page is added? A page's name seems like a pretty vital part of ProcessWire. So, I'm a bit hesitant about messing with it at all! What do the seasoned PW developers out there think? I'm I asking for problems by messing with the page name? Thanks! Lauren
  23. I'd be grateful if anyone has a solution to the following issue. By default Processwire builds its urls like this: www.domain.com/pagenameparent/pagenamechild On the surface this seems excellent for SEO but has been causing us a few issues. Let me explain. In a responsive environment a drop-down menu like below must activate on touch/click. And, the top level is NOT a page. (Obvious, when you consider that you cannot 'click' to this link with your finger). See this example. Below you will see that ABOUT US is a top level menu with children. Is this arrangement on a Bootstrap menu ABOUT US cannot be clicked as it could be on a tablet. Therefore, ABOUT US is not a page. Let's take the first child as an example. WHO WE ARE, would have its url structure built by Processwire like this: www.domain.com/about-us/who-we-are/ 2 problems here: If we create breadcrumb navigation then ABOUT US becomes a link to a page that should not exist. /about-us/ on its own creates issues with SEO. In a complex system trying to exclude these from searches and sitemaps is a a real issue. What would solve the problem is the ability to rewrite the url structure. It would be preferable to write the example url as www.domain.com/who-we-are/ Can this be done without having to change any core code?
  24. Hi there, I am new on using PW. So this is my first Post. In order of that, i want to say Hello to everybody. I used PW, to create a Blog with Tagging Function. I used the Page Field Type to create a new Page from a new Tag, defined in a Blog Article. My Problem is, when I create a New Tag for example "Title A" the Tag and a Page is correctly been created. But the URL of the new Tag Page is a fallback solution like 2014-12-16.... How it is possible to define a custom URL from the Title, as PW does, when I "manually" create a new Page. The easiest Way is the Favorite. I thought I can hook up the Page-Save-Event to Auto-Create a URL, but that would be not that easy. Also I have to fill 2 Fields because its a multilanguage Site. Can anybody help? Greetings from Germany
  25. If I am implementing a 'free tagging field', which is explained by @ryan here > https://processwire.com/talk/topic/71-categorizingtagging-content/ is there any way to do this for more than one word (for example if a tag I entered is 'green energy') So, I have a tag.php template which uses something like: <?php if ( $tag = $sanitizer->selectorValue($input->urlSegment1) ) : ?> <?php $matches = $pages->find("tags*=$tag"); ?> <?php foreach ($matches as $match) : ?> <?php endforeach; ?> <?php endif; ?> This allows me, using url segments, to do: /tags/green and the results with a tag 'green', would come up. But how would I do it for something like 'green energy', so /tags/green+energy or /tags/green-energy... Currently my free tagging field is just a text field, but I could make this into a repeater, for example, if it helps this situation. Thanks in advance
×
×
  • Create New...