TYPO3 OpenGraph with EXT:news - templates

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]

Related

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

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.

Django - format labels in admin panel

I have a label "Inactive sites" in my django admin:
class InactiveSite(Site):
class Meta:
proxy = True
verbose_name_plural = 'Inactive sites (' + str(Site.objects.filter(is_active=False).count()) + ')'
I would like to format "Inactive sites" (change color, font size, etc.). How can I do that?
You can override Django's template for the admin page and include your own css file (preferred way) or directly add it to the html.
You can use the developer tools of chrome or firefox to identify what selector you need.
In Chrome CTRL+SHIFT+C and then click on the link text.
At the moment I only have a modified admin, for me the css selector is: #admin-home > ul > li > ul > li > a
See here: https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#overriding-admin-templates
The answer here has a code sample: https://stackoverflow.com/a/37317429/640916

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.

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.

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