Can't remove homepage slug in storyblok - storyblok

I have started to learn the storyblok CMS and I am stuck on a very basic problem already. I want to create a Home page (www.domain.com = no slug), but I can't get rid of the slug of my page. It is "home" by default, and this is what I get when I try to get rid of it:
And this is my structure:
I have also tried to create a new folder (let's say "Pages") with empty slug and set one of the pages there as a root, but it seems I have to give some slug at least to the folder, so the problem remains. Can't find anything about this problem and will be very thankful for help.

An empty slug won't work because you need the slug for fetching the data according to the storyblok support. What you can do is fetch the data from specific slug in your application's home page.

Related

I am needing to do an internal link that is in FAQs on a site using Vue 3 and Inertia.js?

I have an array of content coming from a database that will be displayed on a page as a group of FAQs. Some of the content will have links to other internal pages on the site. How do I link to the pages using Inertia's link component so that a full page refresh doesn't happen?
It depends on what is returned after using the link. If you return a full view in the response, the page is reloaded. If you return a small JSON object or something else, you can process it without full loading.

Customizing Route in Vue

I'm using Vue and I currently have a page setup that is in the folder structure:
/pages/tg/_tg_id.vue
The setup is working fine as going to website.com/tg/<user-id> resolves to the user's page based off ID.
I'm now being asked to include a username in the URL, but I still need the id as names change and some user's don't even have a name. As a solution I'd like the new URL structure to be:
website.com/tg/<user-id>/<any string>
So that we can use a link that has the username in it, purely for vanity purposes (putting any string after the last slash should resolve in the exact same way).
I'm unsure of how to set something like this up, currently my nuxt.config.js file has no routing settings. Is there something I can add to settings to get the desired behavior?
If you need only second option with username you can just rename your page to
/pages/tg/_tg_id/_username.vue
and thats it.
If you still need your first url too you can use https://github.com/nuxt-community/router-extras-module and define alias inside your page or by extending routes by hand.

Different URLs in category and product page in PrestaShop

I'm new in Prestashop and I've got annoying problem.
Here is url for the product:
https://fine.net/category/3-product.html
And it's fine.
But for the category page i've got:
https://fake.net/3-category
I know that I can't remove the number, but I want to add that number to product page like in category page.
I want to have:
https://fake.net/3-category/3-product.html
How to do this?
It's impossible within the default features. You can try to change your URLs in admin panel Configure->Shop Parameters->Traffic & SEO-> SEO & URLs->Schema of URLs and find Route to products, but, unfortunately, by default, you can use only that keywords which are listed below the field and there is no category_id field. So to reach this you need to override some classes like Dispatcher, Link and maybe more or you can get some module which will do this for you

How to duplicate Prestashop contact form page?

I am using Prestashop 1.5 and want to clone Contact form page.
I tried it by myself, but no success. I duplicated ContactController.php, contact-form.php, contact-form.tpl with different names, than new page appear in backoffice /seo and urls / created desired url, but if i try to access page with choosen url i get page not found.
You also need to change the class name and the $php_self property to make it works.
If the class is not found, erase the /cache/class_index.php file.

Images appear on one page, but not on another page that uses almost the exact same code

I have searched everywhere for help on this, but the only answers I come up with are to the question of why an image won't show up at all. Here is my problem:
In my Rails CRM app, I created a scaffold for "Contacts." I purchased a template on ThemeForest that uses Bootstrap, and have copied all the CSS and javascript files into my Vendor directory. The template comes with a number of HTML files. I selected one and used it as my main Contacts List. I used the "datatables.net" gem to display the contact list. This particular HTML file contains a number of images, mainly used for buttons. All the images display correctly on this page.
On my Edit Contacts page, I copied and pasted all of the HTML from the Contact List page, and inserted a Form For partial in place of the contact list table to display editable fields for a particular contact. At first, all of the images on this page did not work. I did some reading about the asset pipeline, and discovered that the image source should be "asset/image_name.png" instead of "images/image_name.png". (I had copied all my images to the assets/images folder.) I was puzzled why the images on the main contact list page would work, but the Edit page would not. Regardless, I did a find and replace for "/images/" and replaced it with "/assets/". This fixed about 2/3 of the images on the Edit Contacts page. The rest, I am still getting the following error as an example on Rails Server:
Started GET "/contacts/assets/icons/quickstats/user.png" for 127.0.0.1 at 2012-08-15 23:40:42 -0700
ActionController::RoutingError (No route matches [GET] "/contacts/assets/icons/quickstats/user.png"):
This is the same error I got before I did the find/replace.
The problem is you are probably using "assets/blah.png" instead of "/assets/blah.png". This will work for root urls but not for anything deeper, eg. "/contacts/new".
Instead of typing the URL out, use the image_tag helper, which will take care of this stuff for you.