I mean a own style for the notice, at the moment I can change it only global but I would like to have a other style/css depending on choice.A style? Display notice only if in certain styles?
I mean a own style for the notice, at the moment I can change it only global but I would like to have a other style/css depending on choice.
For example:
notice 1 is a warning notice so I select the red style for the notice. Notice 2 is a information, then I select my blue style.
Altogether I want to add a dropdown menu where I can select my style which I created before with css.
Are the styles predefined or user-defined?I mean a own style for the notice, at the moment I can change it only global but I would like to have a other style/css depending on choice.
For example:
notice 1 is a warning notice so I select the red style for the notice. Notice 2 is a information, then I select my blue style.
Altogether I want to add a dropdown menu where I can select my style which I created before with css.
I want to predefine it in a css templateAre the styles predefined or user-defined?
I mean, where do the options come from? From a predefined array or can users add their own style using a form in the ACP?I want to predefine it in a css template
Yes, but where do the option values come from? They can come from a constant in your php files (like you can only order a preset chicken menu at KFC) or from a database table (like everybody can submit posts to a forum)I don't know if I understood you correctly.
You have such menut with the styles:
In this notice options:
From a php file.Yes, but where do the option values come from? They can come from a constant in your php files (like you can only order a preset chicken menu at KFC) or from a database table (like everybody can submit posts to a forum)
OK, so predefined.From a php file.
notice_edit. You should add your options template code there.For which template should I create the modification and what should I add there?
I already looked in your code but I have no overview about the many files.notice_edit. You should add your options template code there.
I highly recommend looking at existing code to see how it is done - XF's code is very self-explanatory.
I already looked in your code but I have no overview about the many files.
And it can't find an template called notice_edit
No it is not. It does not matter which style the user has selected. It matters only which notice style the admin has selected in the creation.There is an option called User is browsing with the following style in User Criteria tab, maybe it's what're you looking for. And you can find a template called notice_edit in Admin Templates in Development tab
See Admin Template Mods.No it is not. It does not matter which style the user has selected. It matters only which notice style the admin has selected in the creation.
Ah found the template but how can I create a template modification with a admin template?
There is an option called User is browsing with the following style in User Criteria tab, maybe it's what're you looking for. And you can find a template called notice_edit in Admin Templates in Development tab
<xen:spinboxunit label="{xen:phrase display_order}:" name="display_order" value="{$notice.display_order}" min="0" step="10" />
<xen:spinboxunit label="{xen:phrase display_order}:" name="display_order" value="{$notice.display_order}" min="0" step="10" />
<xen:selectunit label="Style:">
<xen:option name="style" value="" label="Testing"
<xen:option value="">(Default)</xen:option>
<xen:options source="$searchContentTypes" />
hint="Explain" />
</xen:selectunit>
We use essential cookies to make this site work, and optional cookies to enhance your experience.