Questions tagged [url]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

Disable URL's for nested levels in structure but keep URL's for the 2 top levels

I have some products with categories that go 4 and sometimes 5 levels deep. The site will have an overview page for the first 2 levels. For example: my-website.com/category/subcategory I have created ...
Matthias's user avatar
1 vote
1 answer
48 views

Syntax for URL route instead of using url parameter

I'm confused by the syntax for URL routes. Using Craft 3. I'm working with two separate category groups and have urls like this: site.com/?parameter=123 site.com/abc?parameter=123 site.com/abc/xyz?...
Jake's user avatar
  • 43
0 votes
0 answers
28 views

Hosting server's preview URL doesn't allow me to access /admin control panel

I'm running craft 3. I just switched my hosting provider. They do preview URL's to the domains different than what I had before. The preview looks like this: https://(ip address):8090/preview/domain....
Noah Yamen's user avatar
1 vote
1 answer
73 views

How can I change the local host url from http://localhost:8888 to something custom

I've looked everywhere and can't find a solution to my issue. I'm in the process of setting up a local Craft 3 site and have a question regarding the URL setup. When I originally installed Craft I did ...
wdesign's user avatar
  • 11
0 votes
0 answers
40 views

Trouble with channel URLs and CSS files not pulling through - Craft CMS 4 Multisite

I'm building a multisite on Craft CMS 4 and I'm having trouble with channel URLs. At the moment I'm working locally and then pushing it to the hosting via github. I've created a folder for each site ...
George Bleasdale's user avatar
1 vote
1 answer
128 views

Best way to redirect old URLs

It has been recommended to me to change our URL structure from: site.com/yyyy/mm/dd/slug to site.com/variable-element/slug where the variable may be two segments. Is this something Retour can do, or ...
Emma Swann's user avatar
1 vote
1 answer
18 views

Field data as part of external URL call (jsonclient plugin)

It's possible it's the various search terms I'm using but I can't seem to find anything close to what I'm looking for. I am trying to call an external API URL, with keywords from a field, but while I ...
Emma Swann's user avatar
1 vote
2 answers
163 views

Is there a way to block access to assets by url?

This will probably not be possible, but here goes nothing: I have entries that are password protected using the Template Guard plugin. While this does work perfectly, this does only password protect ...
fr-haus's user avatar
  • 58
1 vote
1 answer
134 views

Hosting and permission problems

It's my first time deploying CraftCMS and I ran into some issues which I don't seem to fix. I'm using Combell to host my website. I can only access my site when I go to "sitename".be/web/ . ...
Knz-dw's user avatar
  • 11
0 votes
1 answer
54 views

How to change image used for www.domain.com

How do I change the image for www.domainname.com (www.affordablemallorca.com)? I am not a coder and need simple instructions to avoid high fees associated with servicing this domain. Thank you.
Memphis's user avatar
1 vote
1 answer
105 views

Is it possible to create a link to the cp that shows all pending entries of a section?

As the question states, I want to create a link that sends a user to the entries page only showing the pending entries. I tried using the cpUrl function but can't seem to get it directly to the ...
Jay V's user avatar
  • 73
1 vote
1 answer
186 views

DOM hash url in entry slug

I try to set the slug of an entry to a url using a hash. https://url.spec.whatwg.org/#dom-url-hash However it seems not possible by default, craftcms changes the hash to a dash. I need that as ...
Honsa Stunna's user avatar
1 vote
2 answers
91 views

Make page urls correspond to their structure

I set up a page entry type under Structures, and because this is for generic pages, I want it to be arbitrarily nestable. From the structure page, this is easy to set up; however, I want the urls for ...
Augustine Calvino's user avatar
0 votes
0 answers
263 views

Remove ID in URL

is it possible to remove ID in post URL : https://www.example.com/example/example-2/exampleexample-2464942 I mean "2464942". Thanks everyone !
Kamil's user avatar
  • 1
3 votes
3 answers
237 views

Craft's case-insensitive routing

I was just surprised when I noticed, that our Craft installation is not case sensitive with routing: E.g. https://domain.com/route/to/page-with-content delivers the same content as https://domain.com/...
Matthias Redl-Mann's user avatar
1 vote
1 answer
53 views

How many different URLs in a project

We are currently evaluating different cookie consent solutions considering its price models and therefore we need to know the amount of "active" URLs in our Craft multisite installation. ...
Matthias Redl-Mann's user avatar
1 vote
1 answer
33 views

What's the best strategy for products that are sold?

I wonder what's best practice for products that are sold? My strategy is to add a lightswitch "sold" and don't display sold products on the website and in the sitemap.xml, in the hopes that ...
outline4's user avatar
  • 595
1 vote
1 answer
104 views

Using a language cookie with Craft

I work on a large, complex site that uses a cookie banner to store a language cookie. We have 11 different languages on the site. We use craft for only one part of our site, with our base URL for ...
Xarlos's user avatar
  • 11
1 vote
1 answer
158 views

Siteurl - craft.app.request.absoluteUrl() output missing "www"

How can I add "www" to the output of {{ craft.app.request.absoluteUrl }}? In my .env file I have DEFAULT_SITE_URL="https://www.mysite.com" but {{ craft.app.request.absoluteUrl() }}...
Jake1293's user avatar
  • 149
1 vote
1 answer
1k views

how to get request url?

I'm trying to get url from request, {{ craft.app.request.url }} but the uri is chinese, like "localhost/測試", it print out "http://localhost/����" did i miss some setting in craft ...
ivesho's user avatar
  • 11
0 votes
0 answers
65 views

All URLs changed path after upgrading to 3.6?

I'm not sure exactly what has changed here. All links are directing to "site.test/admin/site.test/blog/{slug}", when clicking on the link from the entry page. Before they would be "site....
Thurc1996's user avatar
1 vote
1 answer
554 views

Get image asset relative url

I'm using image transforms and getUrl() method to display an image. I'm using Blitz to export my site as a static website. My problem is that .html pages get cached with images that have full urls ...
gkpo's user avatar
  • 123
0 votes
0 answers
155 views

Url Helper does not create a usable url

When I create a cpUrl like that: UrlHelper::cpUrl($this->entry->cpEditUrl) I get something like that: https://hegi.test/admin/entries/article/7707-test But that don't work inside of the browser. ...
Slowwie's user avatar
  • 235
1 vote
2 answers
632 views

How to get an input value without refreshing with twig?

One way to read a dynamically inserted value is to refresh the page and get it in a twig variable through the url, something like this: {% set amount = craft.app.request.getQueryParam('amount') %} ...
Alexis Dalai Waldo Jiménez's user avatar
1 vote
1 answer
159 views

How to translate a structure url

I'm working on a multilingual website where I have one structure called Products. Currently, this structure's URI format is configured like this: {parent.uri ?? section.handle}/{slug} Which returns ...
idix's user avatar
  • 165
2 votes
1 answer
720 views

Site url is not generated correctly when using environment variables

I'm working on a multi-site setup (for a localized website). In my .env file, I have defined a SITE_BASE_URL variable. Then, in the control panel, I set up each site's base url with that environment ...
idix's user avatar
  • 165
1 vote
1 answer
117 views

Update 3.5.15.1 - Fixed a bug where the Updates utility wasn’t showing “Update” buttons

The update button is missing, and the fix is available, but impossible to initiate from the CP. Before I embark on a manual update, I wondered if there was a URL that I could use to trigger the ...
Matt P's user avatar
  • 1,538
0 votes
0 answers
42 views

Craft 3.x Menu : Entry URLs are set by the entry

I can't change the URL? How can I use a custom URL? Here is the link to the image: https://ibb.co/bz9BYnL
CraftN00b's user avatar
3 votes
1 answer
642 views

Why is $DEFAULT_SITE_URL appearing in entries URL?

I have an entry loop on my homepage that uses {{ entry.url }} that links to the full entry. When I click on the entry, the url looks like this mydomain.com/$DEFAULT_SITE_URL/the-entrys-slug Even ...
Justin Kendall's user avatar
1 vote
2 answers
260 views

Conditional for specific page

I'd like to only load some scripts for 1 specific page with the Url /projects/. Currently I'm using: {% if craft.app.request.segments|first == 'projects' %} // load scripts {% endif %} This works. ...
David Flindall's user avatar
1 vote
1 answer
164 views

What is the different between url() and getUrl()

What is the different between url() and getUrl() Ex: {% set solutionIcon = solution.solutionIcon.one() ?? null %} <div class="img-wrapper mt--3 mb-2 mx-auto"> {% if ...
Sameera Thilakasiri's user avatar
1 vote
1 answer
130 views

Where can I set how the pagination links render?

I have inherited a Craft 3 project in which the pagination links render with a query parameter "page": https://mysite.com/blog/?page=2 but this makes crawlers like HREFS to ignore the Next ...
brunouno's user avatar
  • 154
2 votes
2 answers
2k views

How to get second last url segment

I'm setting up a dynamic thank-you page for all forms added to the site. Client can add forms with freeform to any page and I have set the return url to this: {{ form.renderTag({ class: "w-full ...
CreateSean's user avatar
  • 1,963
1 vote
0 answers
224 views

404 Error for assets where "Base URL" and "File system path" are different

I am new to Craft 3 and I have seen similar questions asked many but never answered. I want to store my images in a directory that is not public, yet I want them to be served correctly by Craft. The ...
Marco Camurri's user avatar
1 vote
1 answer
37 views

entry / asset url integrity check

Is there any mechanism in Craft (or a plugin) which protects entries or assets from being deleted, if they are used in an asset / entry field used in an entrytype, global, ...? Or is there a way to ...
Matthias Redl-Mann's user avatar
2 votes
1 answer
3k views

How to get the hash/anchor in the URL?

I am using an entry's slug as the anchor for a page. How do I grab the anchor from the request? For example I want to get #article-one from /blog/#article-one If it's not possible, is there a way ...
kayq's user avatar
  • 77
1 vote
1 answer
92 views

How can I retain entry category filtering on entry pages' pagination

I have a list of entries, with an option to filter them by categories. If no filter is applied, clicking an entry should (and does) take you to the permalink URL for that entry, as defined in the ...
Sandwich's user avatar
  • 626
1 vote
2 answers
788 views

How to remove something from the slug/url

I got entries in the folder /cms/web/videos/ and the url display this: http://domainname.com/cms/web/videos/barco-auro. I want it to be this: http://domainname.com/videos/barco-auro. How do I create ...
Sebastiaan Schillebeeckx's user avatar
1 vote
2 answers
44 views

Section URI format deprecation error

I'm using the following URI format of a channel {slug}-{restaurant.one().slug}-{locations.last().slug}-{locations.one().slug} It throws a deprecation error caused by locations.last() however when I ...
Mark H.'s user avatar
  • 381
2 votes
2 answers
846 views

Change entries URL?

In ExpressionEngine was a URL field under the title field that was filled when writing the title. It was possible to change the URL to something else. Also if i want to change the title of an entry ...
MrGlasspoole's user avatar
1 vote
1 answer
46 views

URL routing with types

We need to setup following URL: DOMAIN/{lang}/{family}/offers/{slug} e.g.: example.com/en/Larsen/offers/example What do we need to configure our section URL? Have anyone an idea?
Patric's user avatar
  • 11
1 vote
1 answer
63 views

Migrating custom routes from v2 to v3

I have a handful of custom routes configured on this project like 'action/(?P<custom_id>[a-zA-Z][0-9]{6})/(?P<slug>.*)' => 'action/_member', If I'm reading the docs correctly, then ...
Steven Grant's user avatar
  • 1,855
2 votes
0 answers
394 views

How to get url from related entry in another site

I'm relating entries from another site in my installation, and I'm having issues getting the correct URL for the entry. This is an example of what I currently have: {% set carouselEntries = entry....
Vaughn D. Taylor's user avatar
1 vote
1 answer
118 views

How to load entries data in the General Configuration file?

I'm trying to set dynamic paths for values such as activateAccountSuccessPath. This kind of code below from my routes.php file works very well: use craft\elements\Entry; $myAccount = Entry::find()-&...
Romain P.'s user avatar
  • 1,798
1 vote
1 answer
187 views

How I’ll get an entryId based on a given URL?

I want to configure deeplinks for an app and want to set up 'universal links'. Right now I'll send an entry id to the element api to get the right content. But with universal links I didn't have a ...
Maarten Heideman's user avatar
1 vote
1 answer
145 views

Filter by slug from URL (advanced)

Channel: Restaurants Channel: Nutrition / contains entries field named restaurant. Required URL format: restaurant-name-nutrition since the URL structure is merged I can't use getSegement(x) ...
Mark H.'s user avatar
  • 381
2 votes
1 answer
157 views

Entries field in categories URI

Is there a way to pass value of an entries field into category URI format? {% if object.level == 1 %} {slug}-{entries.one().slug} {% else %} {slug}-{parent.uri} {% endif %} Thanks.
Mark H.'s user avatar
  • 381
1 vote
1 answer
63 views

Using language specific variables inside section URL settings

When i use some kind of variable in url settings of section, it always uses default language version of this variable. For example, blog has two languages, english (default) and german. If i use ...
Ded Nolyxeux's user avatar
1 vote
4 answers
1k views

How do I get rid of "web" in URL?

I have been all over the docs page and various other topics across the web on this, and nothing seems to solve it for me. It's probably something obvious, but I am stuck. I recently installed Craft 3 ...
Kane's user avatar
  • 21
1 vote
1 answer
923 views

How do I get different URL Format with parent/child structures & how do I display different templates?

I need to create a features structure section for a website that will have parent features and child features. Q1: How do I get different URL Format for parent & child pages? I need the parent ...
mateostabio's user avatar

1
2 3 4 5 6