Questions tagged [url]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
242 views

Deleted page URLs

We're having a bit of a problem with the unique URL system in Craft. An entry was deleted, and a new one has been created to replace it. However the new entry should have the same URL as the old ...
2
votes
1answer
92 views

Does Craft support international urls?

If I create an entry with international characters in urls? e.g. for Polish language? If I create an entry with the word "ułatwienia" in the url, it doesn't work (I get Craft serving up the 404 page),...
1
vote
2answers
325 views

Issue accessing single entry from within category template

I've got a product section on a website where individual product entries are categorised. On the section landing page all the products are listed organised by category. On the individual category ...
3
votes
3answers
1k views

redirect index.php in urls on Craft site to NEVER show index.php

We’ve recently had some issues with a staging site being down and it turned out the reason for this was: In the words of Brad at Pixel and Tonic, the redirect is "intercepting the update request for ...
2
votes
2answers
909 views

Control Panel URLs being rewritten to use index.php?p=admin/

All of our control panel URLs are being rewritten to show index.php?p=admin/*** While this isn't a problem in itself we can't determine why it's happening when the frontend of the website itself is ...
1
vote
1answer
342 views

URL Encode only file name

is there any built-in way to encode malicious file name characters when getting an asset URL through assetHandle.getUrl('transformationName')? My system contains files with names such as /assets/...
5
votes
2answers
2k views

Get the Category name into the URL for an entry

I have a gallery which is categorised. The gallery is a Structure section where the user adds an entry and then assigns it to a category - all good. At the moment, when clicking on an entry title the ...
2
votes
2answers
7k views

Get query string param that has no value

Is it possible to determine whether or not a query string has a param with no value. For example http://www.test.com?myparam Technically that's a valid url but the craft.request object doesn't ...
1
vote
1answer
160 views

Public profile page: requesting user ID with dynamic url routing

I've been referring to this question (can't comment as I don't have enough cred) — The most popular answer works, but I can't for the life of me figure out why Brad's version doesn't. When I try I get ...
2
votes
2answers
436 views

Case sensitive Channel urls problem

So I have a few different channels for different types of content. One called pages which is just for regular web pages. All of those entries work uppercase or lowercase so example.com/About and ...
2
votes
1answer
633 views

Setting up redirects from routes.php

I have a "/5minutes" url in routes.php and people keep typing in "fiveminutes". Is there a way to call a 301 redirect directly in routes.php or would I need to set up an action in my plugin (or ...
5
votes
1answer
429 views

Output localized urls in navigation

Does {{ url('handle') }} output the right url for localized sites? I have a fr/en site and both lang output the english paths, but shows the right content and language/strings on the page. I'm a bit ...
0
votes
1answer
985 views

Changing root folder name

I would like to change the root folder name where my Craft install is currently at. for example: website.com/dev to website.com/draft1. When changing the folder name on my server and the site URL in ...
3
votes
1answer
399 views

Do assets have to be below public_html to access them in redactor?

I love that Redactor lets you choose existing entries, categories, and assets! I am trying to set up a 'Files' source whose File System Path would be something like /home/hostingaccount/craft/files ...
2
votes
1answer
281 views

Setting Date from URL

I have a template, /calendar, which outputs a list of all entries from the events channel. If a user clicks a link for "July 2015", I want the same template to load showing only the events for July ...
0
votes
1answer
78 views

How can I access variables only declared in a template?

I have a template inside a folder located in /templates that is not related to any entry or section: /folder/test.html {% extends '_layout' %} {% set title = 'myTitle' %} {% set ...
0
votes
1answer
110 views

Performance hit from Entry Url Format with multiple {% if %} clauses?

With help from this answer, I've got an Entry Url Format that can include top, 2nd, or 3rd-level categories. It works for any of these situations: top-level-category/entry.slug top-level-category/...
5
votes
1answer
898 views

How to add year and month to Entry URL Format

I'd like to make the Entry URL format of a channel look like this: /news/2015/06/my-slug-here What would I need to enter into the Entry URL Format field in order to do this? The closest I could ...
1
vote
1answer
346 views

Where to place a front-end 'entry form'?

I'm trying to add an entry form outside CP (for users with proper permissions), using this example: http://buildwithcraft.com/docs/templating/entry-form but there's no mentioning of how/where to add ...
2
votes
1answer
854 views

Another index.php?p= problem

I can't get rid of that pesky index.php?p= from my urls. http://mysite.com/index.php?p=about/people If I manually remove index.php?p= e.g. http://mysite.com/about/people it works, but then goes back ...
0
votes
1answer
204 views

Simple linkage to singles

For some reason there is not really a clear mention on the Craft documentation about this. And I couldn't really find anything in here that explains it either. I know this is kind of basic knowledge ...
2
votes
1answer
2k views

How to Make getURL Output Complete URL (rather than root relative)

I'm using getURL() as follows in my Craft template: {% set sharingImageURL = entry.sharingImage[0].getUrl('socialMedia') %} Every time the output is a root relative URL and I'd like it to be a ...
2
votes
1answer
934 views

Home page won't load without 'index.php'

On a fresh install of Craft 2.3.2644, using the hostname alone, example.com returns an error, "The page cannot be displayed because an internal server error has occurred". If I include /index.php (...
1
vote
0answers
238 views

Two domains, one server with Craft installed

I already have Craft running on a single domain name successfully. For my client, we've bought a second domain name for a mini site for SEO purposes, some of which we'd like to use Craft on. What ...
3
votes
2answers
1k views

Custom navigation URLs?

I have an existing ExpressionEngine site which I'm looking at moving to using Craft instead. Only really had a quick cursory glance at the system so far but a little confused on a few things. Say ...
2
votes
1answer
110 views

404 when clicking on the Disqus embed urls

I've just noticed on a site that the Disqus comment embed is suggesting other articles but they're adding a token to the end of the URL, for example: http://australia.thegospelcoalition.org/article/...
2
votes
2answers
6k views

Force trailing slash on URLs

This is an .htaccess question which I found the answer to but, I need to integrate it with the .htaccess that comes with Craft. I need to add trailing slashes to the end of all URLs. I know there is ...
2
votes
1answer
51 views

When accessing a Category url is there direct access to the Category's fields?

I have setup a category group to use Url's. When navigating to that url does the template have direct access to that category's inputs like you would with and entry? Or do you have to use the segment ...
1
vote
1answer
2k views

getUrl() not working

I have the following code in the “main.twig” template: <head> {% block head %} <meta property="og:image" content="{% block pageImage %}{% endblock %}" /> {% endblock %} &...
1
vote
1answer
2k views

How do I get the last uri segment from within a plugin (php)

I have some validation that checks for a unique email when creating a new person. Works great. When I am updating the person, it's no surprise the system won't let me save because the email I am ...
0
votes
2answers
93 views

My Entry URL Format needs are too long for the field restrictions

I'm trying to set the URL of my product entry's to be dynamically created based on 3 category fields and 2 number fields. The category fields are required, but I need to add some logic for the number ...
2
votes
1answer
1k views

omitScriptNameInUrls is not working

I think I've just about hit my wits end here. I'm trying to get set up on a new Rackspace server and I can't seem to get my URL rewriting to work properly. Here's what I got so far: My Craft install ...
2
votes
1answer
449 views

Get 404 Error When Going to mydomain.com/news

Craft newbie here. I have been playing with craft now for a few weeks and built out a couple of pages. I am really liking it this CMS. The one small problem that I just noticed however, is when I ...
2
votes
1answer
524 views

How do I build a link from variables?

I'm building an entry type's menu, automatically populated with several sections. A route for dynamic menu had to be also created. Code {% set section = craft.sections.getSectionByHandle('...
1
vote
1answer
115 views

Is there a way to add a url(not to the file itself) to assets?

I am testing Craft to see if it would be a good fit for sites I build. At this point, I do feel it is great and might fit most of the work I do. The only thing I can't figure out is how I could add ...
1
vote
1answer
65 views

Pathed URL creation from templated files

I've encounterd a problem with URL creation. In my plugin I have the following. public function registerSiteRoutes() { return [ 'korting/zoeken' => array('action' => '/discount/...
1
vote
1answer
93 views

Lookup element by URL

I'm trying to get an element from it's URL. For example, say we have a url of http://craft.dev/blog/article1. Is there a function I can call within a plugin and pass over blog/article1 that will ...
3
votes
2answers
624 views

Is there any easy way (via the admin panel) to get a direct link for an asset?

A client wants to be able to get URLs for assets (for, eg. pasting a direct link into an email). For images and PDFs, "View file" works nicely (the file opens in a new browser tab), but for other file ...
1
vote
1answer
724 views

Whats the best way to create short URL's

I have a client that wants to create a short URL to an entry for a mail shot. What would be the best way to do this. I have the Reroute plugin installed which would work (setting to a 302 redirect) ...
1
vote
1answer
822 views

customised slugs using custom field

I have a 'Profile' channel that gives the profile of people. I have 'Last name' as the title, 'first name' and I'd like to use first name in the slug rather than have to add the first name to the ...
2
votes
1answer
364 views

How do I use Plain Text Field in URL Format?

I'm creating an events system & I want to include the venue in the url of the event along with the event name. For now the venue name is just stored using a plain text field. Is there an easy ...
2
votes
1answer
236 views

Nice-looking URLs for assets

Is there a way to get "vanity URLs" for my assets? Something like: www.example.com/download/asset.pdf rather than: www.example.com/several/subfolders/for/organisation/purposes/asset.pdf I know ...
3
votes
1answer
865 views

How do I make the "%20" in URL's show as "-"

I'm building a site where I am linking entries based on their tags. If you click on a tag you go to a dedicated page with all entries that share the same tag. {% for tag in craft.tags.relatedTo(entry)...
1
vote
1answer
871 views

if entry has same url segment

I have a Structure that has the URL setup like this.. Top-Level Entries - {slug} Nested Entries - {parent.uri}/{slug} How do I list all entries that have the same segment1 of their URL as to what is ...
4
votes
2answers
1k views

URL Redirect Not Working

Seems like I can't get the base install URL to work. To get Craft to show posts I have to format the URL as, /public/index.php?p=news/2015/we-just-installed-craft Instead of just the /news/2015/we-...
5
votes
3answers
4k views

How do I get the url of single pages?

I've been struggling all evening with getting the urls of my singles in a menu generator. At first I thought I nailed it, but it turned out it used the title of the singles instead of the url. When I ...
1
vote
1answer
287 views

Matrix Gallery, with every image having it's own unique URL?

As of right now I have nine or so structures created, each including it's own Image Gallery created in a Matrix. Is it possible to give each image inside that matrix a unique URL? What I'm trying to ...
1
vote
1answer
219 views

How to redirect a url with a query to one that does not have a query

I'm using Redirect Manager (https://github.com/rkingon/Craft-Plugin--Redirect-Manager) and I"m trying to redirect: www.website.com/?post_type=testimonials To: www.website.com/about-us I've tried the ...
2
votes
1answer
3k views

Force download of asset file from template

I have a template called download that receives an asset ID, looks it up and should force the browser to download the file. I've gotten this far with the {% headers %} tag, but I can't figure out how ...
1
vote
1answer
354 views

url with .html extension

I just realized that my page is also accessible when there is a .html extension on the url. The url would be: http://musikwerkluzern.ch/programm but http://musikwerkluzern.ch/programm.html works as ...