Wix CMS - Dynamic Title for Store Collections - velo

I am using WIX store and have the below question:
I need to add a text content [BigTitle 1] available only when i choose Collection/Category
Dryvenner
.
When i choose another Category/Collection [ex: oppfinnelser], Big Title 1 should change to Big Title 2; so what i need is to create dynamic text content linked to each category, any advise?

Your question is a bit light on the details, but I'll try to point you in some directions, and hopefully it will help.
Looks like you are on a Stores product page and you want to know what collections the current item belongs to. To do so, you can use the getProduct() function to get the ID of the current product. Then, you can query the Stores/Products database collection to get the stores collections that the item belongs to.
From there, you can use the $w() API to hide/show or change the text of headings you want to show.

Related

On Joomla, how to show multiple editable articles on the same page?

I have a static website, which I want to make editable by the client. So, I decided to rebuild the website using Joomla. The current static home page uses Zurb's Foundation to display the contents in the following layout.
1st Row: 1 column,
2nd Row: 2 columns,
3rd Row: 1 column
Using Joomal, I have thought of the following options.
the whole page is 1 article: the client would need to understand html, to be able to maintain div's and classes. Isn't it?
Each column on the page (1 column on the 1st row + 2 columns on the 2nd row + 1 column on the 3rd row) is an article that the client can edit. In effect, the page displays the full contents of 4 articles in the above layout.
I think the 2nd option is the way to go. However, I could not figure out how to display multiple, FULL, EDITABLE articles on the same page. I looked at the extension (Articles Anywhere - https://extensions.joomla.org/extension/articles-anywhere). However, it seems that although this extension can display articles, they won't be editable by authorised users.
Your effort and time to answer my question are highly appreciated...
Throughout the last few days, I managed to achieve what I asked about. I thought of documenting it here for the benefit of others.
Let's say we want to create a page, which looks like the following.
1st Row has 1 column: Part-r1-c1
2nd Row has 2 columns: Part-r2-c1 & Part-r2-c2
3rd Row has 1 column: Part-r3-c1
Basically, you need to do the following.
Create a template having module positions for each "Part" of your page layout. Let's call this template "Custom Template". So, you will need to create 4 positions:
Part-r1-c1
Part-r2-c1
Part-r2-c2
Part-r3-c1
Creating a custom template is an involved process with quite a learning curve. You need to be patient until you understand how Joomla templates work. I suggest referring to the official documentation and some tutorial videos/articles. I found the following useful.
Convert an HTML Template to Joomla 2.5/3.0 (3-parts YouTube Video): https://www.youtube.com/watch?v=E13QMWgvwlA&t=3s
https://docs.joomla.org/Creating_a_basic_Joomla!_template
As an alternative to creating your own template, you can use a Template Extension (or framework). I like T3-Framework http://www.t3-framework.org/.
However, in my opinion, investing time in understanding how Joomla templates work has much higher return on investment than understanding how to customise/customize an existing framework. To build your own template, you need to be comfortable with changing php and xml files though.
Create an empty article, and call it something like "Dummy Article".
Create a menu item for your page, e.g. "Services". The type of this menu item should be "single article". Choose the "Dummy Article", which you created above, as the article to be displayed. Assign "Custom Template" to this menu item.
Create an article for each Part of your page, in which you will write the contents, which your customer would be able to change.
Create a module for each Part, and assign it to the related position of the layout, and insert the related article into this module. Inserting articles into modules is not part of standard Joomla (at the current version 3.6.4). To insert articles into modules, you need to use a Joomla extension, like https://extensions.joomla.org/extensions/extension/news-display/articles-anywhere/.
That's it.
I discovered the need for another feature, which I missed asking about in my question. I wanted to make some Parts, which are not editable by the customer. Here's how I did it.
Create a category for articles, which you don't want your customer to change. Let's call it "Protected". Change the permissions for this category to Deny access to Editors (with the assumption that you are going to provide your customer with an Editor User ID.)
Create articles for each Part of your page, in which you will write the contents, which your customer CANNOT change. Categorise these articles as "Protected."
Good Luck!
To display multiple articles on a page you can use the category blog view or the featured view or (with customization) the tagged items view. However you must not use "read more" within the articles. Make sure that the option to display edit icon is turned on and that you are logged in as a user with edit privileges for all of the articles in question. If you are an administrator, publisher or editor by default you will have these.

Cannot set selected elements for the list module on Joomla Fabrik extension

I am using free version of Fabrik extension on Joomla. Both my Joomla and Fabrik are the latest version
I have already done with the Fabrik structure part such as create the form, elements, group, list, and set the form order, validations, appearance, and make them all works. Any registered user can submit the data using the form and it'll be stored into a table on the database
On the front-end, the idea is the user can view two different list view modules through his/her profile, a private list and a public list
Module A lists only entries submitted by the user. The list show the whole entry's data
Module B lists all of the entries submitted by everyone. The list show only selected data from selected field from each entry
This where the problem came from. When I gonna create a module for the list view (Fabrik List Module)
Module Manager > New > Fabrik List Module > Advanced
After I set the title and the list, when I clicked on the 'Select' button for attribute 'Elements', it just response me like I just clicked on 'Cancel', and redirect me to the modules list table instead. If it is just an unfixed bug, I can do nothing about it, but I guess it'll be a lot easier if I can just set something directly using database admin
Finally, after some little hacking, i've succesfully figured it out. Go to [pre]_menu.params (for menu item) or [pre]_modules.contents (for module), and you'll see some json like this
{"calculations":"0","listlayout":"bootstrap","resetfilters":"0","list_elements":"null", ....}
Just replace list_elements value from "null" to this
"{\"show_in_list\":[...]}"
[...] contains the list of elements id (inside table [pre]_fabrik_elements) we want to select them on module view, for example [1,2,3,4,5]
updated :
It's very unpractical solution to just modify the joomla data directly on database. Actually, especially in similar case to mine (sure it is a bug), you can select the elements for a list view (as asked) by simply creating a new separated list apart from the auto generated list which is generated by default on form creation.
That new list will automatically generate new set of elements with new ID based on database table structure, and plus they will not shared their setting with the default list. Alter the default list should definitely be avoid as it will totally change the behavior of the form
On the new list, you can simply un-"show in list" any elements you don't want to show, and create either menu item or module linked to the new list. This is also the best way if you want to alter the list displaying such as change the list header field title, change the list description, or join others elements to the list

Joomla custom component item references

I have been following this guide to successfully create a Joomla custom component: http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Introduction
For simplicity's sake lets say I have two tables, one for authors and one for books.
--AUTHORS--
ID
Name
--BOOKS--
ID
Name
Author_reference
Both have two views each, one list view and one edit view. When I click on a author in the list view it takes me to the list view of the books to see what books the author has written, and only those books filtering out the others.
Here the problem start, when I click on the New button in Joomla I want to add a book to that specific author, but have no way to set that reference. So far I have set that reference with a Session variable when clicking the author but that has obvious flaws such as opening another author in a new tab changing the Session variable.
EDIT: Looks like my question was not very specified. I need a way to send a parameter/variable when clicking the "New" button in admin mode in my component.
You can see a good tutorial for this on another question that I answered: How to add a link category_id added to the admin (JToolBarHelper::addNew)? - Joomla 2.5
Basically, joomla has two functions that you can set in the controller for that view to facilitate adding items to the url even through it's redirects as part of the loading, checking out, and save process.
You can build that with the "foreign key" or "category field" functionality in the Joomla Component Creator. It will save you a lot of headake. Give it a try.

How to display list of content items using Telerik Grid component

I'm begginer in the Orchard CMS.
I would like to create Content Type composed from different parts and fields which I know before. I want this content type to be enumerable ie I use content part List, I want to list it using telerik components.
For example my content type is Product and I specify its fields: Price, SKU apart from default: user(who created it) and creation time fields. Moreover the product contains also image gallery, ie image gallery content part.. I want the list of products to be shown using Telerik component Grid, including creation time and user name.
Is it better to create the whole module specifying all its fields(price,SKU) and its templates or is there any way to just take what has been already created in orchard as a content type and display it different way(using telerik)..
thanks for any advice ;)
Tomas
It appears this topic was moved and answered here:
http://orchard.codeplex.com/discussions/371276

Search View For Admin In magento

I have created a Sample Module (Admin Side) in Magento.. I managed To created a form and Then Stored the form field values in Database. Now I am trying To create a search view for that. to show me all the values which i have stored in my table. however i am not able to get it. when i press the tab I directly get the form view. I want the search view first and a button there which ll direct me to this form. I want it the same way as it is for product, category or any other module. Do anyone Know How can I do it.
It's called a grid. The process is kind of long to explain here, but if you search online there are a few tutorials that explain how to do it (here's one that I found useful: http://www.webspeaks.in/2010/08/create-admin-backend-module-in-magento.html). Keep in mind that you can also model your own code after core code. If you want to make a grid like the Category grid, then go look in the code how its made.

Resources