I am wondering if there is anyone out there who knows about Views in Drupal 6, specifically the Ticker aspect that could assist me with the following issue:
I have to create a news ticker that reads in the titles from a specific content type and then prints out those titles in a horizontally scrolling fashion. That is the easy part, I have gotten that to work. The part that I am having issues with is I then need to format this ticker to be a specific font, placed in a specific location on the webpage, but still take in the feed from the content types that it is supposed to. Does anyone know how to use this/ has anyone done anything that works similarly to this in the past?
I would also like to apologize if this is a dumb question, but I do really need assistance.
Thank you
I'd suggest enabling a views block which will allow you to move the view into any region. Defining a custom region will allow you to add the view anywhere within your site. You can also use views_embed_views() which allows you to reference the view directly. Your view will likely require additional JS to load for the ticker function to work and a modified version of using views_embed_view() with slideshow should help.
Related
I know that this is bit of a conceptual question but after searching alot i am unable to grab the concept that is why i am hoping to get help from this platform.
I often need to change some markup or styles etc on the elements let se in $page['highlight']
When i var_dump any variable in any .tpl file it gives just a basic information. Let say i have to add additional div element in a content that is set to be rendered in $page['highlight'] region. What would be the way that i grab that element and alter it before it rendered on page.
The same case happend to me when i made a page view in drupal. I had a custom .tpl file which was displaying the view and all records were getting displayed by a single variable like
print $rows
I am not specifically asking for the code but it would be helpful to many other users including me to grab the concept with a little example.
Thanks alot.
There are different ways to do the same things you say.
In views, you can customize your results by Theme: information option. Is's in the bottom-right part of the view configuration. Here you have the option to create a new file and customize the view results. In your case you need to create a new Row style output: (it contains the value of $row variable).
Here is a tutorial: https://www.ostraining.com/blog/drupal/views-templates/
About the $page variable. You have different options depends on the context. For example if you need to add a in all pages, the best option is to edit the page.tpl.php in your theme.
Another option is to change the template.php of your theme, but only if you need to add html in some cases.
Hope it helps.
Regards.
I've used a modified themeforest template for a single php page and have an issue where the navigation links that take you to the various unique id's on the page are working fine but cut off the top part of the section h3 that it has linked to.
It's a positioning problem for sure and most likely to do with the modifications I made to the flex-slider that the template included.
But I can't determine how to adjust the css (or script) to correct the issue.
For example, the site is http://goudkamp.stacklaw.com.au/ and when you click Services, you can see what I mean.
I have the template on the site as well so you can see how it SHOULD work - http://goudkamp.stacklaw.com.au/v2/template/.
I came across another article that suggested using the script
if(window.location.hash.length){
$(window).scrollTop($(window).scrollTop() - 100);
}
However, I don't think I should need it when the template works perfectly.
I just don't know where to start looking to make the necessary adjustments.
Please help!
Thanks in advance
Wait - I found it!
After looking at the suggestion on the other article, it made me think that it must be done in the theme's custom scripts. So I looked in the custom.js file for any script that referenced the main nav.
There was an "offset" line with the markup "//use this to position the window exactly where you want". Testing a small change to this had the desired effect.
Thanks anyway.
I've been tasked with providing the backend for a news feed that will be used by our company apps. The feed will pull articles from our current website, which is built with ModX (evolution). So far, I've designed the feed to send JSON through a specified url containing the needed information. It's currently in the following format (using Ditto placeholders):
{
"title":"[+longtitle+]",
"description":"[+description+]",
"link":"[(site_url)][~[+id+]~]"
},
Here's my issue - the link I'm providing through the JSON (in the link tag) opens the full, desktop version of the page. Our current site is not responsive, and was not originally designed to handle mobile devices. We would like to open a small, clean page showing ONLY the ['content'] of that particular article. I'm looking for a way to link to a page showing only this content - no header, no footer, nothing.
I know that I could create a new page to handle all of this, but it needs to be dynamic. New articles are created regularly, and I'd like to avoid having to add another page to handle this for every article, while also making it simple for the writing team to integrate this feature.
One of my ideas so far is:
Pass a GET parameter to the URL "link" in the JSON - something like - www.mysite.com/article1?contentOnly=true. Then, in my article, detect this parameter in PHP and handle accordingly. I would need this snippet on each article written, so it may cause issues down the road if our staff writers forget to add it.
I haven't worked with ModX long, so I'm assuming there's a better way to handle this. Any ideas would be greatly appreciated. Please let me know if I need to provide more information.
I am not 100 % sure how you have done this, but here's my tip.
Don't use the resource itself to output the JSON. Doing this based on a GET-paramter will required the entire site to be uncached. Instead, use a single resource for the feed and supply the id/permalink there.
For example: mysite.com/feed?id=1, mysite.com/feed?latest or something like that.
Done this way, you could have an empty template with just the snippet that is parsing to JSON in it. This has to be uncached of course, but the rest of the site could be cached as normal.
I am developing a Content Manager System using PHP and wonder if there is a css generator i can use as a plugin. The generated code is stored in MySQL database.
I have looked at many of these here, but i cant seem to see any i can provide to my users as a plugin.
I want one that creates layouts and can change background. If i cant get one, then how do i create one.
i hope you cant get any plugin for that, since the page you are designing must be known to you [positioning, font size, etc]
First, Create a complete site with some css which hold layout, like a1.css
then , you can do the same with same attributes with a2.css, a3.css...etc.. [this may be terrible]
or
you can change dynamically by Jquery to generate dynamically , like
.css( "padding-left", "+=15" )
or use different frameworks and make it accessible, LINK
hope it gives you an idea!
I'm starting with "PrestaShop" and I just can't figure out, how to put a link in template to custom page I created in CMS module... I thought, there might be some easy way, as there is in WordPress, like "get_permalink(ID)", but there's nothing like this and I can't find anything about this anywhere and it just drives me mad.
So, here's the deal, I've got a custom template, and there are some top links, like "About Us". I've created this page in CMS and it has ID "6".
How do I make this bloody "PrestaShop" to generate a link to this page in my template file?
About
I think you're looking for SMARTY template tags and custom variables defined for Prestashop specifically. The one the you probably need is {$base_dir} which will be translated to http://www.yoursite.com/ obviously with appropriate protocol (non-secure HTTP or secured HTTPS).
After that, you only need to include page URL, which you can get from Admin->Tools->CMS section.
If I find any specific tags that you can use to call the content, I will update my post here.
Your Text
the "WHAT goes here" is just the url you want your link drives the client to when clicking on that link.
You need to understand a little minimum of HTML for this I guess. Check html tag a meaning .
Prestashop has a fairly good and extensive documentation. Two and half seconds googling drives me here, just like answering your question it looks like.