PrestaShop1.7.x: registering custom assets in child theme for all, not product - prestashop

In PrestaShop (PS) 1.7, I'd like to register an additional css asset as explained in the documentation:
By now you probably understood that this theme.yml file became the
heart of PrestaShop themes.
To register assets, create a new assets key at the top level of your
theme.yml, and register your files according to your needs. Page
identifiers are based on the php_self property of each controller
(example)
For example, if you want to add an external library on each page and a
custom library on the Product page:
assets:
css:
product:
- id: product-extra-style
path: assets/css/product.css
media: all
priority: 100
But, instead of doing so for a product, I want to do it for all:
assets:
use_parent_assets: true
css:
all:
- id: my-custom-colors.css
path: assets/css/my-custom-colors.css
priority: 51
This appears not to be working. It is also extremely similar to this question on the PS forum, which is as of today unanswered.
Can this be done at all, or am I originally at fault by not understanding the docs?

Related

Dynamic Routes in NextJs don't load on different param

I am currently doing a project with NextJs about a blog posting application similar to medium.com. However, I am facing a little problem when it comes to dynamic routes.
Background Info: My pages structure looks like this:
pages
|-> profile
|-> [username].tsx
url path example: /profile/[username]
Use case: I am in the profile page of someone (/profile/someone), and in the navbar, which is globally accessible, you have the ability to go into your profile (/profile/yourName). Howerver, if you click View Your Profile, the url does update, but the page does not appear to load and therefore, you cannot see your profile.
Original Code:
<Link href={`/profile/${username}`}>
<button>View Profile</button>
</Link>
Current Solution:
if (router.asPath.includes('profile'))
router.replace({
pathname: '/profile/[username]',
query: { username: username },
}).then(() => router.reload())
else
router.push(`/profile/${username}`)
The solution provided works, but load times significally increases when compared to the "Original Code" block or when asPath does not include 'profile'. I think this is because I am using reload(). I want to know if there is another solution that will improve loading time.
Thank you

Lazy load pages in PrestaShop?

By default, pagination in PrestaShop is available in every product page (displaying up to 10 items per page).
But according to my project requirements, I need a lazy loading page (only 10 products need to displayed before trying to scroll down the page). Does PrestaShop have this feature ?
This is not possible by default.
You have to create your own module or buy/use available product like:
Masonry All Products
Infinite Scroll for Prestashop
3. Answer by thepsyntist from https://www.prestashop.com/forums/
[...] I successfully implemented an infinite scroll module on
Prestashop 1.6.0.11 (A custom theme) and 1.6.1.0 (Default theme). I
found this module on GitHub a couple of months ago and finally today I
got success implementing it. Hence I have no direct link for it or
know who created it. Link to the module.
If you'd like to load images the same way, there is one another module.

Rally 2.0 example provided will not load

So I've recently decided to upgrade to Rally SDK 2.0. I'm using the starter kit and following the directions on the website. All I've done so far is added:
launch: function() {
this.iterationCombobox = this.add({
xtype: 'rallyiterationcombobox'
});
}
To the js file. Ran the rake command, loaded App.html into a browser. It is blank. According to the website, there should be a small combobox on the top left of the screen. I don't know what I missed, I assumed the example would work as the website displayed.
edit I should add that this isn't the only thing contained in the HTML file. I just meant that rake generates an HTML file at the beginning that adds //Add Code Here to the javascript function. I meant that the above code is the only tihng I've changed.
I tested your code snippet and it works in my testing. Did you paste the App code into a Custom HTML App in Rally? Or are you running outside of Rally?
If the latter, you'll need to modify the src attribute of the script tag in App.html:
<script type="text/javascript" src="https://rally1.rallydev.com/apps/2.0p5/sdk.js"></script>
So that it contains a fully-qualified reference to the AppSDK2 JS library.
The AppSDK API Docs have some good Examples of simple starter Apps. The Grid examples are good places to start. You can click on the "View Source" link within any of the Example apps and see the source code.

Adding menu item to Spree

I've created a spree site and using spree_essentials and spree_essentials blog have added a blog to my site. How can I add a link to the blog from my main navigation?
I've created an extension for customization called Theme. It placed this folder into my main project folder rather than in to vendor/extensions not sure if that matters or not.
Pretty new to rails and Spree.
Here's the link for the extensions I used: https://github.com/citrus/spree_essential_blog
To do what you want add a hook inside lib/your_extension_hooks.rb, something like this :
insert_after : sidebar do
# you can add a partial too ^^
%(<label>test</label>)
end
You can find all available hook here.

How To Include Breadcrumb Module On A Component for Joomla 1.6

I have a custom component that requires the standard Joomla breadcrumb module. I tried using the following and it didn't do anything:
<jdoc:include type="modules" name="position-2" />
Keep in mind this code came from the template index file and I am trying to integrate the module into a custom component
That is not how to do it. This is for use in Joomla templates to include the module position. You need to make the breadcrumbs programmatically from within your component. See this tutorial on how to do this: http://docs.joomla.org/How_to_add_breadcrumbs
NB: Once you have done this ensure that you have the breadcrumbs module published and the position is set correctly for your specific template.
This link will also be useful - http://docs.joomla.org/JPathway/1.6
[EDIT]
Try add this in your view.html.php for your component:
$app = JFactory::getApplication();
$pathway = $app->getPathway();
$pathway->addItem('Google', 'http://www.google.com');
This will add a breadcrumb that says "Google" and when clicked will link to www.google.com
In terms of creating your breadcrumbs you need to use your url to determine how far you are into you component e.g. "Home // Category // Weblinks" would have a url like:
http://www.domain.com/index.php?option=com_weblinks&cid=2:dogs&id=54:link-to-google
cid = 2 tells us that we are at least in the category, so we can add a breadcrumb for this.
id = 54 tells us we are looking at a weblink so we can add a breadcrumb for the page before which is the list of weblinks within the category