So this is probably really basic but i have been searching inside and out trying to find the answer, on my site i have a cart and the title of the cart is what i want to change, however in the source it looks like:
<h1 class="text-center">{{ 'cart.general.title' | t }}</h1>
cart.general.title i cannot find any reference to this so i can edit the title, sure i could probably just replace that string with my title but that may not be the efficient approach.
Where can i edit cart.general variables?
Thanks
These are the language variables. They can accessed in Settings-> Checkout->Checkout Language
Related
Dynamic multilingual sites from the backend to the replacement of large sites
I changed the language, but this time I am trying for the first time to do it at the front desk (Nuxt.js + i18n).
<a href="https://gooogle/en.com" data-link="fugafuga">
Without using nuxt-link
<template>
<a href="https://gooogle/{{t('locale')}}.com" data-link="{{t('hogehoge')}}" >
</template>
Is it possible to divert and use a tag as it is?
(In the above writing method, an error occurred and it was useless, so please teach me a workaround)
I18n t method wrapped in quotes in inside tag quote
How do I write it?
Such a shape is desirable because the scale is too large
We apologize for the inconvenience, but we would appreciate it if you could teach us.
thank you.
Suggested fix:
<template>
<a :href="`https://google/${t('locale')}.com`" :data-link="t('hogehoge')"></a>
</template>
You can read more about data binding with Vue/Nuxt here: https://v2.vuejs.org/v2/guide/class-and-style.html#Object-Syntax
Cannot figure out how to make the values dynamic. I am using this package on blog posts. Each post has different values.
<social-sharing url="https://vuejs.org/"
title="The Progressive JavaScript Framework"
description="Intuitive, Fast and Composable MVVM for building interactive interfaces."
quote="Vue is a progressive framework for building user interfaces."
hashtags="vuejs,javascript,framework"
twitter-user="vuejs"
inline-template>
Any help would be appreciated. Thank you
Update. I used this code and seems to work fine.
<social-sharing
:url="getUrl()"
:title="post.subject"
:description="post.subject"
:quote="post.subject"
:hashtags="tagsstring +'blog'"
twitter-user="Dukesnuz"
inline-template
>
I wrote a short blog [post]: https://david.dukesnuz.com/blog/10/installing-a-social-media-package-in-a-vuejs-component on this topic.
You should be able to use standard binding with v-bind: so:
<social-sharing v-bind:url="expressionOrVariableName"
v-bind:title="blogPost.title"
...and so on
inline-template>
Where the value you pass to the binding is an expression or a variable/prop name.
I'm building a Single Page Application using, Vue, Vue-router and Vuex. I've tried to implement Algolia Instantsearch vuejs, but I'm having some issues. Since my app is using a lot of nested components, I'm having a hard time figuring out how to structure this one.
This is the basic structure:
- App
- Header (this is where the search input is placed)
- Content
- Search (this is where the refinements and results are shown)
- Footer
I've read the documentation, but I might have missed something. Let's say the user is on the homepage, when starting typing into the searchinput in the Header component. I then use vue-router to go to /search, but this doesn't seem to work?
I don't know how to do this? As from what I can understand, the documentation only show you how to sync with vue-router and now how to handle my scenario.
I believe this is a fairly common use case for instantsearch, but I couldn't find anything searching through Google. Maybe because, I don't know how to describe the issue.
I hope you can help.
Thanks!
If you use the latest version of vue-instantsearch, you may use ais-configureas describe by https://www.algolia.com/doc/api-reference/widgets/configure/vue/.
<ais-instant-search :index-name="indexName" :search-client="searchClient">
<ais-configure :query="query" />
<ais-hits>
<div slot="item" slot-scope="{ item }">
<h2>{{ item }}</h2>
</div>
</ais-hits>
</ais-instant-search>
I think this might be a simple one,
I have installed haystack with whoosh backend. Followed the tutorial and all is working well.
Now I am trying to create a link from other templates to the search url. And I am not figuring out how to do it.
my search url is:
url(r'^search/', include('haystack.urls')),
and I want to refer to link to it from another template. something like:
<a href={% search url %}>
I am using Django 1.3.5 and Haystack 1.2.7
Help would be appreciated.
cheers
a
Ok, so found out the solution for my own question.
In the url declaration, if I use the optional name i can the use it to refer to the search url.
In urls.py:
url(r'^search/', include('haystack.urls'), name='haystack_search')
and in template:
<a ref={% url haystack_search %}>search page</a>
I am working with ExpressionEngine and the Structure add-on latest versions.
I am looking for some help on generating a 4 items nav bar, where two items are in a different Structure level.
My Structure rows look like this:
Services (parent)
-----Translation (child)
-----Videos (child)
Studio (parent)
About us (parent)
And my main navigation bar should be:
Translation - Videos - Studio - About us
As you can see they are at different levels. I've been working for hours trying even with Structure Entries add-on, but I simply cannot find a way to generate this navigation.
I'd appreciate any help you can give me.
Structure ultimately stores its 'pages' as regular EE entries, so you could just hardcode the entry ID's into a channel:entries loop to grab the titles:
<ul>
{exp:channel:entries dynamic="no" entry_id="3|4|6|12" disable="categories|pagination|member_data"}
<li>{title}</li>
{/exp:channel:entries}
</ul>
Alternatively if you want to give the client complete control of what appears in the navigation you could set up a custom checkbox field for 'show on primary nav' and then use something like this:
<ul>
{exp:channel:entries dynamic="no" search:options="=show on primary nav?" disable="categories|pagination|member_data"}
<li>{title}</li>
{/exp:channel:entries}
</ul>
(would be a bit nicer using P&T Checkboxes instead of the crappy built-in ones.)
No offence to the Structure module but it's this kind of thing that would really make me use Nav-EE instead, or, more often I would opt for an entirely hardcoded top level nav... The client usually thinks they need full control but in reality that top level navigation is seldom going to change (and when it does the chances are they'll need you to do other work on the site anyway!).
You are looking for Structure Entries: http://devot-ee.com/add-ons/structure-entries (which is free!)
I managed to get the Structure way to get that navigation, which is quite a code:
<ul class="myclass">
{exp:structure:nav start_from="/services" include_ul="no"}
{exp:structure:nav exclude="21|4|10" max_depth="1" include_ul="no"}
</ul>
I found the James' hard coding solution a best option. Thank you!
Since you've already spent significant time fiddling with Structure Entries, I'd say give Taxonomy a shot since it will surely get the job done with very little fuss. http://devot-ee.com/add-ons/taxonomy
For the purpose of managing a nav tree that doesn't fit the mold, the Taxonomy module is very handy and flexible.