In sitefinity, How to prevent appending default Language prefix in page URLs? - sitefinity-8

In my sitefinity application, I need to remove default language prefix from sitefinity page URLs. Like in my case ar from https://www.example.net/ar/individual/products
So I did the following configuration change as mentioned in sitefinity documents:
1- Clicked Administration » Settings » Advanced.
2-In the treeview on the left, clicked Resources » UrlLocalizationStrategies » SubFolderUrlLocalizationStrategy » Parameters
3-In Key includeSubfoderPrefixForDefaultLanguage, entered False
4-Saved my changes and restarted the application.
But it did not work. Now, pages are still showing default culture prefix in Page URLs

You can try the following:
navigate to Administration > Settings > Advanced > ContentView > Controls > FrontendPages > Views > FrontendPagesListView > View Modes > TreeTable > Columns > ViewColumn
There, under Client Template you will see something like this:
<a sys:href="{{ (PageLiveUrl) }}" target="_blank">View</a>
From what I see, this PageLiveUrl is resolved by not taking the includeSubfolderPrefixForDefaultLanguage param into account.
So, what you can do is to manually remove the language portion:
<a sys:href="{{ (PageLiveUrl).replace('/en/', '/') }}" target="_blank">View</a>
Save and refresh the page.

Related

How to change product url by id to name in opencart?

the defult url of a product is =
http://localhost/OpenCartDesign/upload/index.php?route=product/product&product_id=64
I want to change this in http://localhost/OpenCartDesign/upload/index.php?route=product/product&product_name= here show product name not product id
Rename /OpenCartDesign/upload/.htaccess.txt to /OpenCartDesign/upload/.htaccess. Inside Dashboard go to System > Settings > Action: Edit (Store) > Server (tab) > Use SEO URLs: YES and click the SAVE button.
Then you will have this http://localhost/OpenCartDesign/upload/product-name which is much better for SEO.

TYPO3 OpenGraph with EXT:news

I'm using TYPO3 and News System and Bootstrap Package.
I see the opengraph tags twice. One of the news and one of page. How i can resolve it?
You need to exclude the opengraph of the bootstrap package when being on a news detail page. Then you only get it once.
Put this into your TypoScript
[globalVar = GP:tx_news_pi1|news > 0]
page.meta.og:title >
page.meta.og:site_name >
page.meta.og:description >
page.meta.og:image >
[global]
Thank you Georg for the hint. For TYPO3 version 9 you should use new typoscript condition syntax:
// Prevent bootstrap_package og:attributes for single view
[(request.getQueryParams()['tx_news_pi1'])['news'] > 0]
page.meta.og:title >
page.meta.og:site_name >
page.meta.og:description >
page.meta.og:image >
[end]

Opencart order list admin controller

I have the admin > view > tamplate > sale > order_list.tpl which I assume is handled by admin > controller > sale > order.php . More specific, getList() method. However when i edit this method, nothing changes in the frontend and I can't figure out why. I assume it's the wrong controller... Any ideas? I'm new to opencart.
The selected controller seems to be the right one.Just put some exit;or die(); and check.

Django advanced nesting urls

Welcome,
I've got a problem where I`m trying to make a deep nesting.
The thing is that I have Menu that has SUBMENU that can have multiple categories and those categories can have multiple services available and those services can have multiple products.
Writing urls for that specific thing was easy but when I'm trying to create a product that has no category and I want it to be displayed directly in SUBMENU the problem is with writing url for that specific product that doesnt overlap with SUBMENU slug.
For example:
MENU > SUBMENU1 > CATEGORY 1 > AVAILABLE SERVICES > PRODUCT 1
MENU > SUBMENU2
MENU > SUBMENU3 > PRODUCT 2
all of those names are slugged and my urls.py looks like this:
url(r'^uslugi/(?P<category_slug>\S+)/(?P<services_slug>\S+)/(?P<service>\S+)/$', views.show_service_details, name='show_service_details'),
url(r'^uslugi/(?P<category_slug>\S+)/(?P<services_slug>\S+)/$', views.show_services, name='show_services'),
url(r'^uslugi/(?P<category_slug>\S+)/$', views.show_categories, name='show_categories'),
url(r'^uslugi/(?P<product_slug>\S+)/$', views.show_product_without_cat, name='show_product_without_cat'),
The thing is that when I try to enter a product with no category (just placed in submenu), my urls are calling the show_category view. Changing sequence of those urls won't resolve my problem, because I won't be able to enter my show_categories because django will try to execute show_product_without_cat
I there a reasonable solution for this without redesigning all structure ?
Unfortunetely even saying to django in template to call specific VIEW doesn't help at all. It just goes through all urls and matches the first one
<a href="{% url 'show_product_without_cat' i.url %}" >
<img src="/media/{{ i.image }}"> <br/>
</a>
URL dispatcher finds the first url that matches the request path and calls the found view. You have the same url regex for both show_categories and show_product_without_cat views so only the first occurrence of url will work.
The only solution is to create an intermediate view which will check the slug against Category or Product model and call the appropriate view.
def product_or_category(request, slug):
if Product.objects.filter(slug=slug).exists():
return show_product_without_cat(request, slug)
return show_categories(request, slug)
And assign the url to this view:
url(r'^uslugi/(?P<slug>\S+)/$', views.product_or_category,
name='show_product_or_category'),
But note that with this solution you can't have a category and product with the same slug.

Prestashop: How do I change my page title as an administrator

How do I change my page title (file attached) as an administrator? From the back office.
Click here to view my example of "Page title"
To change your shop’s name in PrestaShop, first open your site’s Admin Control Panel,
Go to Preferences -> Store Contacts(Contacts)
Replace ‘Shop Name’ text box with your desired shop name.
Scroll down and click Save.
Thanks.
Are you trying to change the site name?
You can do this from:
Backoffice > Preferences > Store Contacts > Contact details > Shop
name
If you need to update CMS page:
Backoffice > Preferences > CMS > Click Edit on page you want to change
-> Meta title