I am very much new to Drupal but am loving it to start with.
I got struck at a point with respect to theaming.
I have a region called 'footer-teaser' just above footer. Its width is 800px. its been split into 3 equal size columns. Each column has the following.
Image of size 120x120
Some teaser text
Link to 'read more'
The design requirement is all the above should be editable by the admin from the admin interface. If its static i would have hardcoded this but since the requirement is dynamic, i am not aware of how to achieve this. I have customised page.tpl for other sections of the page except this.
I am sure someone else would have faced this issue before and was wondering if anyone can direct me in the right direction? Even better if an example is provided.
Cheers
RD
When you say you have a "region" called footer-teaser are you talking about a region in Drupal theming terms, if so skip to part two of this answer.
Part 1, set up a region to put content in.
in your theme.info file you can define regions, these are shown as places to but blocks on the block admin tool. Change your theme.info file to include something like
regions[footerteaser] = Footer Teaser
you will also need to print $footerteaser in the appropriate place in your .tpl file.
Test this works with another existing block before moving to part two.
Part 2, populate the region.
There are many ways you can generate the code to populate this region. I believe the simplest would be to create editable blocks as in the block example module.
If you want static content that is editable from an admin interface, so you don't need to make a list of top nodes and that sort. You can create a block from the block interface, and put any html in it.
If you need to make lists of content etc, you can use the views module to create such blocks.
Else you will have to use the custom block approach that Jeremy suggests.
Related
I am fairly new to Wordpress. I am writing a real estate site, and I want to have a Service Area page that displays the Counties that we serve in various states. So what I want to happen is to have a dropdown list where a user can select a state, and based on the state that they select, a text area will display that counties that we service in that state.
So basically, I want to store text content in the form of counties that will be displayed based on the conditions of a dropdown list.
I have no idea where to start. Is there a plugin that works for this kind of situation such as a form plugin that can store content, or am I going to have to write custom PHP/Javascript to make something like this happen. I am asking because this seems like a common scenario on websites, I just don't know where to look.
Thanks for any suggestions that you may have!!
So what I ended up doing was creating a select box in html that when a change happened on the list, a javascript function was called that changed the visibility of a text area and also set the value of its content to display all the counties that I needed. Ended up being much more simple than I expected. No PHP functions and short code necessary.
I am setting up a blog. I have developed several views to sort out the various types of articles “business, design, news, etc.” On the article page and in the teaser however I would like to stye the “content: title” field. As seen in the example below.
In the research I have done it sounds as though you can accomplish this by creating a wrapper class in the “style settings” options in that titles configuration menu.
Here is where I am having difficulty. When I select “Customize field and label wrapper HTML” for instance nothing happens. I am not able to the field where I should be able to enter my custom wrapper class. I have tried hitting “apply” then going back, I have applying the section and then saving the changes to the view, and I have tried applying saving and flushing the cache but with no result.
Is there a configuration some where that is preventing me from applying this option? Or am I doing something wrong. It is frustrating to no end any advice would be much appreciated thanks.
To add a wrapper in views "content:title" this is the most easiest way -
Just go to Title fields rewrite section.
you can wrap an element using Style Settings of that specific field. just click a field and there you can see the options. wrap label / field in your desired element.
Is there any option to completely control a Search module with a Summary view? I am struggling to get there. I have the following settings so far:
In admin I created an Index called PublicSearch with a number of fields.
I am getting a search result which is a mixture of two content parts - Question and Expert
I have a Part view to be used in search result for Experts called ExpertSummary.cshtml. The view only contains the following elements now:
#model dynamic
<p>Expert Summary</p>
When the search result is coming I only expect the "Expert Summary" to be visible in Expert region of the Search but I am getting an additional "body" section (truncated to X characters). It seems to me because "body" is selected as a field when I created the Index it is coming up.
Each Expert record has an image of expert which is coming up in the search result and When I take out <Place Fields_MediaPicker="Content:1" /> from Placement.info it disappears, which is fine.
But I want this summary to be completely controllable in ExpertSummary.cshtml - like a two column layout where the left col will hold the expert image and the right one will hold a brief description along with some other info - but everything would be in the View - should not come from Orchard search module as defaults.
In short I want Orchard's Index and Search modules to be functional and working like it is now but the layout and information I want to control completely using custom HTML in Parts/ExpertSummary.cshtml view.
Is this at all possible? If yes, how?
Please suggest. I am completely lost my way in Orchard framework!
I'm not completely sure I understand your question... Orchards search returns a Summary view by default. So you need to control the layout of your summary. Use shape tracing to create a new alternate to change the layout of the summary view. So ExpertSummary won't control the entire layout, it will just control the Expert part. Then use placement to decide what to display. http://docs.orchardproject.net/Documentation/Understanding-placement-info
Also, tagging questions with "orchardcms" will be more useful than "orchardcms-1.7".
I'm just trying to move one of my old php sites to wordpress. As part of the site I have 'top tables' e.g. top 10 cars, listing their features etc. At the moment that all comes from a database and the HTML is generated from the data.
So if a car soon gets a hybrid engine I just check that in the database and my web site table updates to reflect that.
This all works fine. I just don't know where to start when trying to implement something like this in wordpress. I want to keep the WP header, footer, nav... and put my table in to the content area.
Someone recommended simply copying the current generated HTML in to a new post and editing the HTML when anything changes, this sounds like a quick solution but there must be a better way of doing this.
Ideally I would want to keep my current data input pages (and separate database) for all of this 'table data' and present the out put as a post.
If anyone can point me in the right direction (key words I should search for, a guide) that would be great.
Depending on your usecase, you'll usually want to use a static page template:
http://codex.wordpress.org/Page_Templates
Or shortcodes:
http://codex.wordpress.org/Shortcode_API
I am sure this is a simple fix, but cannot manage to work it out. I want to show a teaser only on a single node for my content type (e.g., node/1), and not all nodes within the content type. How would I do this?
There are many ways to do that, depending on what you actually want.
A way would be to have two content types, one for node/1 and one for the other.
You could also solve this from node edit: when you edit the node/1, create a teaser and a full view, but for the others, create just a full view (no teaser). In this case, the other nodes will appear in full view even in lists of nodes.
You can alter the node view inside a hook_nodeapi (in Drupal 6) or hook_node_view (in Drupal 7) and force the full view of the node for any other nodes of a certain type, but not node/1.
Another way of doing this would be to also force the full view for the other nodes except node/1, but in a hook_preprocess function...
Maybe if you describe what you need in a more detailed context, then we can find other ways of doing this...
Vasi.
Create two different displays of the view. On the first, make it a block, and set it to display only one item with the teaser. On the second, don't include a teaser and set the offset (under "items to display") to 1.
Make the first block display above the second display.